chore: init task-master #54
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: Changeset Release | |
on: | |
push: | |
branches: | |
- main | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
permissions: | |
contents: write | |
packages: write | |
pull-requests: write | |
id-token: write # npm provenance | |
jobs: | |
release: | |
name: Changeset Release | |
runs-on: ubuntu-latest | |
outputs: | |
published: ${{ steps.changesets.outputs.published }} | |
version: ${{ steps.changesets.outputs.version }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
id: pnpm-install | |
- name: Setup Node.js 20.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: "pnpm" | |
registry-url: "https://registry.npmjs.org" | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Setup Git User | |
run: | | |
git config --global user.email "kangju2000@gmail.com" | |
git config --global user.name "Juhyeok Kang" | |
- name: Create Release Pull Request or Publish to npm | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
publish: pnpm release | |
version: pnpm version-packages | |
commit: "chore: version packages" | |
title: "chore: version packages" | |
setupGitUser: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Trigger binary build workflow | |
if: steps.changesets.outputs.published == 'true' | |
uses: peter-evans/repository-dispatch@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
event-type: package-published | |
client-payload: '{"version": "${{ steps.changesets.outputs.version }}"}' |