Skip to content

DoomScroller Publish #1

DoomScroller Publish

DoomScroller Publish #1

name: DoomScroller Publish
on:
workflow_run:
workflows: [DoomScroller CI]
branches: [main]
types: [completed]
# Prevent multiple publish actions from running simultaneously
concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: write
pull-requests: write
id-token: write # Required for NPM provenance
jobs:
publish:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/doom-scroller
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Important for changesets to work correctly
- name: Setup PNPM
uses: pnpm/action-setup@v4
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "pnpm"
- name: Install dependencies
run: pnpm install
working-directory: .
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
publish: pnpm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}