meta(changelog): Update package versions (#50) #8
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: Publish | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "**/CHANGELOG.md" | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
publish: | |
name: Publish | |
permissions: | |
id-token: write | |
contents: write | |
pull-requests: write | |
runs-on: ubuntu-latest | |
if: | | |
contains(github.event.head_commit.message, 'meta(changelog)') | |
&& contains(github.event.head_commit.message, 'Update package versions') | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
cache: yarn | |
node-version-file: "package.json" | |
- name: Install | |
run: yarn install | |
- name: Build | |
run: yarn build | |
- name: Publish to NPM | |
uses: changesets/action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
with: | |
publish: yarn changeset:publish | |
createGithubReleases: true |