From c85f0bea83fc1c0f721906cc441710482e5b25da Mon Sep 17 00:00:00 2001 From: lisonge Date: Mon, 4 Sep 2023 19:59:51 +0800 Subject: [PATCH] chore: release --- .github/workflows/release-please.yml | 1 - .github/workflows/release.yml | 12 +++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 5c84bc70..9505fb73 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -16,4 +16,3 @@ jobs: - uses: google-github-actions/release-please-action@v3 with: release-type: node - package-name: release-please-action diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dd60b648..cf0026af 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,8 +7,7 @@ on: jobs: release: - if: | - ${{ contains(github.event.head_commit.message, 'chore: release') }} + if: ${{ startsWith(github.event.head_commit.message, 'chore(main):') && contains(github.event.head_commit.message, 'release') }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -21,9 +20,7 @@ jobs: - run: pnpm install - - name: Release - run: | - pnpm run build + - run: pnpm run build - name: Git commit id: commit @@ -44,10 +41,7 @@ jobs: branch: ${{ github.ref }} - name: Publish package + if: ${{ steps.commit.outcome == 'success' }} run: | pnpm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }} pnpm publish - - - name: Log - if: ${{ steps.commit.outcome != 'success' }} - run: echo Nothing to commit.