publish #17
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: publish | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
branches: | |
- 'changeset-release/**' | |
types: | |
- closed | |
workflow_dispatch: | |
jobs: | |
publish: | |
name: Bump package versions and publish to npm. | |
environment: CI | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' || github.event.pull_request.merged == true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/actions/setup | |
- id: create_token | |
uses: tibdex/github-app-token@v2 | |
with: | |
app_id: ${{ vars.GH_APP_ID }} | |
private_key: ${{ secrets.GH_APP_PRIVATE_KEY }} | |
- name: Create Release Pull Request | |
uses: changesets/action@v1 | |
with: | |
commit: "chore: bump package versions" | |
publish: pnpm run release | |
title: "[Changesets] Bump package versions" | |
env: | |
GITHUB_TOKEN: ${{ steps.create_token.outputs.token }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |