Skip to content

Commit

Permalink
chore: update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
iamkun committed Jun 2, 2023
1 parent 851e774 commit daa1379
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ permissions:

jobs:
release:
env:
GITHUB_TRIGGER_REF: ${{ github.event.workflow_run.head_branch }} # For workflow_run the GITHUB_REF is the default branch, as mentioned in the docs
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Release
runs-on: ubuntu-latest
Expand All @@ -24,6 +26,7 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.GITHUB_TRIGGER_REF }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
Expand All @@ -40,4 +43,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm install -g @semantic-release/changelog @semantic-release/git semantic-release && semantic-release --debug && echo release success
run: |
npm install -g @semantic-release/changelog @semantic-release/git semantic-release
GITHUB_REF=${{ env.GITHUB_TRIGGER_REF }} semantic-release
echo release success
curl -s ${{ secrets.GITEE_SYNC_URL }}

0 comments on commit daa1379

Please sign in to comment.