-
Notifications
You must be signed in to change notification settings - Fork 60
72 lines (65 loc) · 2.27 KB
/
update-release.yml
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
63
64
65
66
67
68
69
70
71
72
name: Update Release
on:
workflow_dispatch:
inputs:
head-sha:
description: |
The head SHA of the release PR to use for finalizing the release.
required: true
workflow_call:
inputs:
head-sha:
type: string
description: |
The head SHA of the release PR to use for finalizing the release.
required: true
secrets:
AUTOMATION_PRIVATE_KEY:
description: |
The private key to use to generate a token for accessing the release engineering repository.
required: true
env:
HEAD_SHA: ${{ inputs.head-sha }}
jobs:
update-release:
name: "Update release"
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # We need the full history to compute the changelog
ref: ${{ inputs.head-sha }}
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install dependencies
run: pip install -r scripts/release/requirements.txt
- name: Generate token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.AUTOMATION_APP_ID }}
private-key: ${{ secrets.AUTOMATION_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: "codeql-coding-standards-release-engineering"
- name: Update release assets
env:
GITHUB_TOKEN: ${{ github.token }}
RELEASE_ENGINEERING_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
python scripts/release/update_release_assets.py \
--head-sha $HEAD_SHA \
--layout scripts/release/release-layout.yml \
--repo "$GITHUB_REPOSITORY" \
--github-token "$GITHUB_REPOSITORY:$GITHUB_TOKEN" "github/codeql-coding-standards-release-engineering:$RELEASE_ENGINEERING_TOKEN" \
--skip-checkrun "release-status" "Update Release"
- name: Update release notes
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
python scripts/release/update-release-notes.py \
--head-sha $HEAD_SHA \
--repo "$GITHUB_REPOSITORY" \
--github-token "$GITHUB_TOKEN"