Skip to content

fix: grant workflows permission for rolling tag updates. #3

fix: grant workflows permission for rolling tag updates.

fix: grant workflows permission for rolling tag updates. #3

name: Update rolling release lines

Check failure on line 1 in .github/workflows/update-rolling-lines.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/update-rolling-lines.yml

Invalid workflow file

(Line: 12, Col: 3): Unexpected value 'workflows'
on:
workflow_dispatch:
inputs:
version:
description: Released semver (X.Y.Z) to refresh rolling line aliases for
required: true
permissions:
contents: write
workflows: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Resolve release commit
id: rel
run: echo "sha=$(git rev-list -n 1 refs/tags/v${{ inputs.version }})" >> "$GITHUB_OUTPUT"
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
- name: Download release bundle
run: gh release download "v${{ inputs.version }}" -p ui-bundle.zip
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update rolling release lines
run: node .github/scripts/post-release.mjs "${{ inputs.version }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: v${{ inputs.version }}
RELEASE_SHA: ${{ steps.rel.outputs.sha }}
GITHUB_REPOSITORY: ${{ github.repository }}
- name: Commit supported-lines.json on main
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cp supported-lines.json /tmp/supported-lines.json
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git fetch origin main
git checkout main
git pull origin main
cp /tmp/supported-lines.json supported-lines.json
git add supported-lines.json
if git diff --staged --quiet; then
echo "supported-lines.json unchanged"
else
git commit -m "chore: update supported-lines.json for v${{ inputs.version }}"
git push origin main
fi