Skip to content

Publish

Publish #14

Workflow file for this run

name: Publish
on:
workflow_run:
workflows: [CI]
branches: [main]
types: [completed]
concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: write
pull-requests: write
jobs:
publish:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 9
- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Add node_modules/.bin to PATH
run: echo "$PNPM_HOME" >> $GITHUB_PATH
env:
PNPM_HOME: ~/.pnpm-store/node_modules/.bin
- name: Check .changeset folder
run: ls -la .changeset
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
publish: pnpm exec turbo release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}