Merge pull request #114 from ethanniser/changeset-release/main #184
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 | |
on: | |
push: | |
branches: | |
- "main" | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build | |
run: pnpm turbo --filter "./packages/*" build | |
# Using custom token `MY_GITHUB_TOKEN` with more access to avoid rate limiting | |
- name: Create Release | |
id: changeset | |
uses: changesets/[email protected] | |
with: | |
commit: "chore(release): 📦 version packages" | |
title: "chore(release): 📦 version packages" | |
publish: pnpm run release:actual | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# Changeset has some issues with pnpm so we sync it up manually | |
# - name: Sync lockfile if necessary | |
# if: steps.changeset.outputs.hasChangesets == 'true' | |
# run: | | |
# git checkout changeset-release/main | |
# pnpm install --no-frozen-lockfile | |
# git add . | |
# git commit -m "chore(release): 📦 sync lockfile" | |
# git push origin changeset-release/main |