ci: 修改发布流程

pull/41/head
zjx0905 2023-04-04 10:40:28 +08:00
parent 4409a5720b
commit ac4fd149ab
4 changed files with 9 additions and 8 deletions

View File

@ -29,7 +29,8 @@ jobs:
- name: Build - name: Build
run: pnpm build -a run: pnpm build -a
- name: Set .npmrc for publish
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ./.npmrc
- name: Publish - name: Publish
run: pnpm publish:ci run: pnpm publish:ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

View File

@ -40,8 +40,7 @@ jobs:
with: with:
tag_name: ${{ github.ref }} tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }} release_name: Release ${{ github.ref }}
body: | body: 'CHANGELOG.md'
Please refer to [CHANGELOG.md](https://github.com/axios-miniprogram/core/blob/main/CHANGELOG.md) for details.
prerelease: ${{ steps.prerelease.outputs.result }} prerelease: ${{ steps.prerelease.outputs.result }}
- name: Build Release Asset - name: Build Release Asset

1
.npmrc Normal file
View File

@ -0,0 +1 @@
shell-emulator=true

View File

@ -95,10 +95,10 @@ function createReleases() {
['patch'], ['patch'],
['minor'], ['minor'],
['major'], ['major'],
['prepatch', 'alpha'], ['prepatch', 'beta'],
['preminor', 'alpha'], ['preminor', 'beta'],
['premajor', 'alpha'], ['premajor', 'beta'],
['prerelease', 'alpha'], ['prerelease', 'beta'],
]; ];
const releases: string[] = []; const releases: string[] = [];
for (const [type, preid] of types) { for (const [type, preid] of types) {