Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
name: NPM Publish

on:
push:
workflow_run:
workflows: ["Node.js CI"]
types:
- completed
branches:
- master

jobs:
publish:
runs-on: ubuntu-latest
# Only publish if the CI workflow that triggered us actually succeeded.
# workflow_run fires on completion regardless of conclusion.
if: ${{ github.event.workflow_run.conclusion == 'success' }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_sha }}
cancel-in-progress: true

steps:
- uses: actions/checkout@v4
with:
# Check out the exact commit that CI ran against, not just master HEAD
# (master may have moved on if another push landed concurrently).
ref: ${{ github.event.workflow_run.head_sha }}

- name: Install pnpm
uses: pnpm/action-setup@v4
Expand Down
Loading