Skip to content
Merged
Show file tree
Hide file tree
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
15 changes: 11 additions & 4 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,25 @@ on:
push:
branches:
- master
- beta

jobs:
publish:
name: Publish
runs-on: ubuntu-24.04
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
environment:
name: npm
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 24
- name: Install dependencies
Expand All @@ -26,8 +32,9 @@ jobs:
run: npm run test
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# No need to set NPM_TOKEN because of OIDC
NPM_CONFIG_PROVENANCE: true
run: |
git config --global user.name "Github Actions"
git config --global user.email "sebastien.jourdain@kitware.com"
Expand Down
16 changes: 15 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,19 @@
},
"files": [
"dist"
]
],
"release": {
"branches": [
"master"
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
"@semantic-release/github"
]
},
"publishConfig": {
"access": "public"
}
}
Loading