-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (54 loc) · 1.88 KB
/
Copy pathupdate-rolling-lines.yml
File metadata and controls
62 lines (54 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Update rolling release lines
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