Skip to content

ci: use pat for release #9

ci: use pat for release

ci: use pat for release #9

Workflow file for this run

name: Release
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
permissions:
checks: write
contents: write
pull-requests: write
packages: read
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup and Install
id: install
uses: ./.github/actions/setup-and-install
with:
node-version: 20
- name: Publish
id: changesets
uses: changesets/action@v1
with:
publish: pnpm release
env:
# Use PAT to create a new GitHub release PR, because the default GITHUB_TOKEN doesn't trigger workflows
# https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow
# https://github.com/orgs/community/discussions/55906
GITHUB_TOKEN: ${{ secrets.PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}