Skip to content

Commit

Permalink
release.yml 更新1 (cycjimmy/semantic-release-action)
Browse files Browse the repository at this point in the history
  • Loading branch information
famibee committed Feb 4, 2024
1 parent 6f48c03 commit bc93303
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
registry-url: https://npm.pkg.github.com/
node-version: '20'

- run: npm ci
- run: npm test

- run: npm run semantic-release
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

- run: npx can-npm-publish --verbose && npm publish || echo "Does not publish"
env:
Expand All @@ -38,12 +38,12 @@ jobs:
run: |
export LATEST_TAG="$(curl -fsi "https://github.com/${GITHUB_REPOSITORY}/releases/latest" | awk -F/ '/^(L|l)ocation:/ {print $(NF)}')"
echo "::set-output name=latest_tag::${LATEST_TAG}"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{steps.latest_tag.outputs.latest_tag}}
- run: git log

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
registry-url: https://registry.npmjs.org/
node-version: '20'
Expand Down

0 comments on commit bc93303

Please sign in to comment.