Add provenance config #1668
Workflow file for this run
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: Snapshot Release | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: write-all | |
| jobs: | |
| dependencies: | |
| uses: the-guild-org/shared-config/.github/workflows/changesets-dependencies.yaml@main | |
| if: ${{ github.event.pull_request.title != 'Upcoming Release Changes' }} | |
| secrets: | |
| githubToken: ${{ secrets.GITHUB_TOKEN }} | |
| alpha: | |
| runs-on: ubuntu-24.04 | |
| if: | |
| ${{ github.event.pull_request.title != 'Upcoming Release Changes' && | |
| github.event.pull_request.head.repo.full_name == github.repository }} | |
| outputs: | |
| published: ${{ steps.changesets.outputs.published }} | |
| publishedPackages: ${{ steps.changesets.outputs.publishedPackages }} | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - uses: the-guild-org/shared-config/setup@main | |
| name: setup env | |
| with: | |
| nodeVersion: '20' | |
| packageManager: pnpm | |
| packageManagerVersion: '9.1.0' | |
| - name: alpha release | |
| id: changesets | |
| uses: the-guild-org/[email protected] | |
| with: | |
| tag: alpha | |
| prepareScript: 'pnpm run build' | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_CONFIG_PROVENANCE: true | |
| release-candidate: | |
| runs-on: ubuntu-24.04 | |
| if: | |
| ${{ github.event.pull_request.title == 'Upcoming Release Changes' && | |
| github.event.pull_request.head.repo.full_name == github.repository }} | |
| outputs: | |
| published: ${{ steps.changesets.outputs.published }} | |
| publishedPackages: ${{ steps.changesets.outputs.publishedPackages }} | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - uses: the-guild-org/shared-config/setup@main | |
| name: setup env | |
| with: | |
| nodeVersion: '20' | |
| packageManager: pnpm | |
| packageManagerVersion: '9.1.0' | |
| - name: release candidate | |
| id: changesets | |
| uses: the-guild-org/[email protected] | |
| with: | |
| tag: rc | |
| prepareScript: 'pnpm run build' | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |