Merge pull request #17 from blackphoenix42/dependabot/github_actions/… #38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release (Changesets) | |
| on: | |
| push: | |
| branches: [master] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: write # for provenance (npm) | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version-file: .node-version | |
| cache: npm | |
| registry-url: https://registry.npmjs.org | |
| - name: Install deps | |
| run: npm ci | |
| - name: Create or Publish Release | |
| id: changesets | |
| uses: changesets/action@v1 | |
| with: | |
| publish: npm run release:publish --if-present || npm publish --provenance --access public | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Build site (post-publish optional) | |
| if: steps.changesets.outputs.published == 'true' | |
| run: npm run build --if-present || true |