Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions .github/workflows/auto-dependency-updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
matrix:
include:
- base: main
version: v4
- base: release/3
version: v3
- base: release/2
version: v2
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Publish GitHub package and trigger main branch update

on:
push:
branches:
- release/3
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}

- name: Get GitHub App User ID
id: get-user-id
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}

- name: Checkout
uses: actions/checkout@v5
with:
token: ${{ steps.app-token.outputs.token }}
fetch-depth: 0

- name: Build Artifacts
uses: ./.github/actions/build-artifacts
Comment on lines +34 to +35

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Supply required PAT to build artifacts

The new publish workflow calls the composite action ./.github/actions/build-artifacts without providing its required PERSONAL_ACCESS_TOKEN input. That action’s definition marks the token as required, so this job will fail immediately with “Input required and not supplied: PERSONAL_ACCESS_TOKEN” before any build or publish steps run, blocking the release/3 publish pipeline.

Useful? React with 👍 / 👎.


- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://npm.pkg.github.com

- name: Bump version
shell: bash
run: pnpm version prerelease --no-git-tag-version

- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'chore: Bump version [skip actions]'
file_pattern: 'package.json'
commit_user_name: '${{ steps.app-token.outputs.app-slug }}[bot]'
commit_user_email: '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com'

- name: Publish Docs
run: npm publish --access restricted
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Trigger main branch update
shell: bash
run: gh workflow run update.yml --ref main
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
4 changes: 2 additions & 2 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Update GitHub page
on:
push:
branches:
- main
- release/v3
Comment on lines 3 to +6

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Update workflow targets nonexistent release/v3 branch

The update workflow now listens for pushes on release/v3, but the rest of the release automation (auto-dependency matrix and the new publish workflow trigger) consistently use the release/3 branch naming. With this typo the update job will never run on the actual release branch, so pushing release/3 changes will no longer deploy the docs unless triggered manually.

Useful? React with 👍 / 👎.

workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
Expand All @@ -15,7 +15,7 @@ permissions:
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
group: 'pages'
cancel-in-progress: false

jobs:
Expand Down
Loading