Skip to content

Commit 01b06a4

Browse files
committed
Add post release workflow to update the draft release
1 parent bde3c89 commit 01b06a4

4 files changed

Lines changed: 408 additions & 0 deletions

File tree

.github/workflows/post-release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Finalize Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: |
8+
The version to release (MUST follow semantic versioning).
9+
required: true
10+
ref:
11+
description: |
12+
The git commit, branch, or tag to release from.
13+
required: true
14+
15+
push:
16+
branches:
17+
- rvermeulen/release-process-improvements
18+
19+
jobs:
20+
update-release:
21+
name: "Update release"
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v3
26+
with:
27+
ref: ${{ github.event.inputs.ref }}
28+
- name: Install Python
29+
uses: actions/setup-python@v4
30+
with:
31+
python-version: "3.9"
32+
33+
- name: Install dependencies
34+
run: pip install -f scripts/release/requirements.txt
35+
36+
- name: Update release assets
37+
env:
38+
RELEASE_VERSION: ${{ inputs.version }}
39+
RELEASE_REF: ${{ inputs.ref }}
40+
GITHUB_TOKEN: ${{ github.token }}
41+
RELEASE_ENGEERING_TOKEN: ${{ secrets.RELEASE_ENGEERING_TOKEN }}
42+
run: |
43+
python scripts/release/update-release-assets.py
44+
--version $RELEASE_VERSION
45+
--layout scripts/release/release-layout.yml
46+
--ref $RELEASE_REF
47+
--repo "$GITHUB_REPOSITORY"
48+
--github-token "$GITHUB_REPOSITORY:$GITHUB_TOKEN" "github/codeql-coding-standards-release-engineering:$RELEASE_ENGEERING_TOKEN"

scripts/release/release-layout.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 0.1.0
2+
3+
layout:
4+
certification_kit.zip:
5+
- workflow-log:
6+
name: ".*"
7+
- workflow-artifact:
8+
not-name: "Code Scanning Query Pack Generation"
9+
code-scanning-cpp-query-pack.zip:
10+
- workflow-artifact:
11+
name: "Code Scanning Query Pack Generation"
12+
artifact: code-scanning-cpp-query-pack.zip
13+
supported_rules_list.csv:
14+
- shell: |
15+
python ${{ coding-standards.root }}/scripts/release/create_supported_rules_list.py --csv > supported_rules_list.csv
16+
supported_rules_list.md:
17+
- shell: |
18+
python ${{ coding-standards.root }}/scripts/release/create_supported_rules_list.py > supported_rules_list.md
19+
user_manual.md:
20+
- file: docs/user_manual.md

scripts/release/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
semantic-version==2.10.0
2+
PyGithub==1.59.1
3+
PyYAML==6.0.1

0 commit comments

Comments
 (0)