Release Package #3
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
# https://github.com/changesets/action | |
name: Release Package | |
on: | |
workflow_dispatch: | |
permissions: | |
pull-requests: write | |
contents: write | |
jobs: | |
release-package: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- uses: pnpm/[email protected] | |
with: | |
version: 8 | |
run_install: true | |
# consume changesets and create pr if it exists, otherwise publish package | |
- name: Publish to npm | |
uses: changesets/action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
with: | |
publish: npx changeset publish |