Skip to content
This repository was archived by the owner on May 5, 2026. It is now read-only.
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
33 changes: 25 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,47 @@ name: Release

on: [push]

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

jobs:
release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v4

# see https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/making-authenticated-api-requests-with-a-github-app-in-a-github-actions-workflow
- uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
id: app-token
with:
app-id: ${{ vars.STORYBOOK_BOT_APP_ID }}
private-key: ${{ secrets.STORYBOOK_BOT_APP_PRIVATE_KEY }}

- name: Prepare repository
run: git fetch --unshallow --tags

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

- name: Enable Corepack
run: corepack enable

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 24.x
cache: "yarn"

- name: Install Node.js dependencies
run: yarn install --immutable

- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
yarn release