feat: remove actions/setup-node to fix OIDC trusted publishing (#12) #8
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 | |
| on: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| id-token: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - uses: voidzero-dev/setup-vp@v1 | |
| with: | |
| node-version: "22" | |
| cache: true | |
| - uses: actions/setup-node@v4 | |
| with: | |
| registry-url: "https://registry.npmjs.org" | |
| - run: vp install | |
| - run: vp run @klinking/squircle#build | |
| - run: npx semantic-release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish to npm | |
| run: | | |
| VERSION=$(node -p "require('./package/package.json').version") | |
| npm view @klinking/squircle@$VERSION version 2>/dev/null && echo "v$VERSION already published, skipping" || npm publish ./package |