Skip to content

Use the changeset publish command in release.yml #2

Use the changeset publish command in release.yml

Use the changeset publish command in release.yml #2

Workflow file for this run

name: Release
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup pnpm and node
uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
cache: "pnpm"
- name: Install Dependencies
run: pnpm install
- id: create_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.CHANGESETS_RELEASE_APP_ID }}
private_key: ${{ secrets.CHANGESETS_RELEASE_PRIVATE_KEY }}
- name: Create Release Pull Request
uses: changesets/action@v1
with:
commit: "chore(release): Release latest changesets"
title: "chore(release): Release latest changesets"
createGithubReleases: true
publish: pnpm changeset publish
env:
GITHUB_TOKEN: ${{ steps.create_token.outputs.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}