From ac4fd149ab296e6233f8b9a0d5a78b4fd330fb80 Mon Sep 17 00:00:00 2001 From: zjx0905 <954270063@qq.com> Date: Tue, 4 Apr 2023 10:40:28 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E4=BF=AE=E6=94=B9=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publish.yml | 5 +++-- .github/workflows/release.yml | 3 +-- .npmrc | 1 + scripts/release.ts | 8 ++++---- 4 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 .npmrc diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index acc458f..cd34099 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -29,7 +29,8 @@ jobs: - name: Build run: pnpm build -a + - name: Set .npmrc for publish + run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ./.npmrc + - name: Publish run: pnpm publish:ci - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5007db5..7d9a8cb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,8 +40,7 @@ jobs: with: tag_name: ${{ github.ref }} release_name: Release ${{ github.ref }} - body: | - Please refer to [CHANGELOG.md](https://github.com/axios-miniprogram/core/blob/main/CHANGELOG.md) for details. + body: 'CHANGELOG.md' prerelease: ${{ steps.prerelease.outputs.result }} - name: Build Release Asset diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..3bd3b7d --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +shell-emulator=true diff --git a/scripts/release.ts b/scripts/release.ts index 51aeb0c..b073ab7 100644 --- a/scripts/release.ts +++ b/scripts/release.ts @@ -95,10 +95,10 @@ function createReleases() { ['patch'], ['minor'], ['major'], - ['prepatch', 'alpha'], - ['preminor', 'alpha'], - ['premajor', 'alpha'], - ['prerelease', 'alpha'], + ['prepatch', 'beta'], + ['preminor', 'beta'], + ['premajor', 'beta'], + ['prerelease', 'beta'], ]; const releases: string[] = []; for (const [type, preid] of types) {