Skip to content

Commit

Permalink
Add post release workflow to update the draft release
Browse files Browse the repository at this point in the history
  • Loading branch information
rvermeulen committed Sep 18, 2023
1 parent be3076d commit 187851e
Show file tree
Hide file tree
Showing 4 changed files with 408 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/post-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Finalize Release

on:
workflow_dispatch:
inputs:
version:
description: |
The version to release (MUST follow semantic versioning).
required: true
ref:
description: |
The git commit, branch, or tag to release from.
required: true

push:
branches:
- rvermeulen/release-process-improvements

jobs:
update-release:
name: "Update release"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.ref }}
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.9"

- name: Install dependencies
run: pip install -f scripts/release/requirements.txt

- name: Update release assets
env:
RELEASE_VERSION: ${{ inputs.version }}
RELEASE_REF: ${{ inputs.ref }}
GITHUB_TOKEN: ${{ github.token }}
RELEASE_ENGEERING_TOKEN: ${{ secrets.RELEASE_ENGEERING_TOKEN }}
run: |
python scripts/release/update-release-assets.py
--version $RELEASE_VERSION
--layout scripts/release/release-layout.yml
--ref $RELEASE_REF
--repo "$GITHUB_REPOSITORY"
--github-token "$GITHUB_REPOSITORY:$GITHUB_TOKEN" "github/codeql-coding-standards-release-engineering:$RELEASE_ENGEERING_TOKEN"
20 changes: 20 additions & 0 deletions scripts/release/release-layout.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 0.1.0

layout:
certification_kit.zip:
- workflow-log:
name: ".*"
- workflow-artifact:
not-name: "Code Scanning Query Pack Generation"
code-scanning-cpp-query-pack.zip:
- workflow-artifact:
name: "Code Scanning Query Pack Generation"
artifact: code-scanning-cpp-query-pack.zip
supported_rules_list.csv:
- shell: |
python ${{ coding-standards.root }}/scripts/release/create_supported_rules_list.py --csv > supported_rules_list.csv
supported_rules_list.md:
- shell: |
python ${{ coding-standards.root }}/scripts/release/create_supported_rules_list.py > supported_rules_list.md
user_manual.md:
- file: docs/user_manual.md
2 changes: 2 additions & 0 deletions scripts/release/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
semantic-version==2.10.0
PyGithub==1.59.1
PyYAML==6.0.1
Loading

0 comments on commit 187851e

Please sign in to comment.