Enable Publish Attestation #208
This file contains 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: Build and release | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
# Grant Permissions to the GH Token to capture attestation information from the GH agent | |
id-token: write | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
environment: release | |
steps: | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: latest | |
- name: setup repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: setup node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "20" | |
- run: pnpm install | |
- run: pnpm build | |
- run: npx semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NPM_CONFIG_PROVENANCE: true | |