Publishing new version (via samlaycock) π #51
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 | |
run-name: Publishing new version (via ${{ github.actor }}) π | |
on: | |
push: | |
branches: | |
- main | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "This job was triggered by ${{ github.actor }} on ${{ github.ref }}." | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Setup Node.js 18.x | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 18.x | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm i --frozen-lockfile | |
- name: Create PR or publish | |
uses: changesets/action@v1 | |
with: | |
publish: pnpm run publish | |
version: pnpm run version | |
commit: "chore: publish" | |
title: Publish new version | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |