Skip to content

Merge branch 'mp/pagnation-papercuts-oct2025' of github.com:primer/re… #26593

Merge branch 'mp/pagnation-papercuts-oct2025' of github.com:primer/re…

Merge branch 'mp/pagnation-papercuts-oct2025' of github.com:primer/re… #26593

name: Canary Release
on:
push:
branches-ignore:
- 'main'
- 'next-major'
- 'changeset-release/**'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release:
concurrency:
group: npm-canary
cancel-in-progress: false
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
- name: Set up Node
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build --if-present
- name: Create .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN_SHARED }}
- name: Publish canary release
run: |
if [[ -f '.changeset/pre.json' ]]; then
npx changeset pre exit
fi
echo -e "---\n$( jq .name packages/react/package.json ): patch\n---\n\nFake entry to force publishing" > .changeset/force-snapshot-release.md
npx changeset version --snapshot
npx changeset publish --tag canary
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Output canary version
uses: actions/github-script@a3e7071a34d7e1f219a8a4de9a5e0a34d1ee1293
with:
script: |
const package = require(`${process.env.GITHUB_WORKSPACE}/packages/react/package.json`)
github.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: context.sha,
state: 'success',
context: `Published ${package.name}`,
description: package.version,
target_url: `https://unpkg.com/${package.name}@${package.version}/`
})
- uses: ./.github/actions/upload-versions