Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ jobs:
release:
runs-on: ubuntu-latest
environment: npm
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
Expand All @@ -32,10 +35,7 @@ jobs:

- name: Build and publish
if: steps.check.outputs.published == 'false'
run: pnpm release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm build && npm publish --access public --provenance

- name: Ensure git tag exists
if: steps.check.outputs.published == 'false'
Expand All @@ -50,7 +50,6 @@ jobs:
if: steps.check.outputs.published == 'false'
run: |
TAG="v${{ steps.check.outputs.version }}"
# --verify-tag ensures the tag exists before creating the release
gh release create "${TAG}" --generate-notes --title "${TAG}" --verify-tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading