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
28 changes: 9 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,38 @@ on:
branches:
- master

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions:
contents: write
pull-requests: write
# OIDC
id-token: write

jobs:
release:
name: Release
runs-on: ubuntu-latest
env:
# Force npm to emit provenance (SLSA) when publishing via OIDC.
NPM_CONFIG_PROVENANCE: true

steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup Node.js 24.x
uses: actions/setup-node@v4
with:
node-version: 24.x

- name: Ensure npm 11.5.1+ for trusted publishing
run: npm install -g npm@^11.8.0

- name: Enable Corepack
run: corepack enable

- name: Setup Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "yarn"
registry-url: "https://registry.npmjs.org"

- name: Install Dependencies
run: yarn
run: yarn install --immutable

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@e0145edc7d9d8679003495b11f87bd8ef63c0cba
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
version: yarn changeset version
publish: yarn release
commitMode: github-api
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN_PHANTOM_SECURITY_BOT }}
Loading