Skip to content

Workflow to make bumping versions easier + Adding Checksums #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Aug 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: 📦 Bump Workflow

on:
workflow_dispatch:
inputs:
new_version:
description: |
The version to update to (eg: 2.6.0 or 2.6.0-dev do not include `v`).
required: true
jobs:

apply-version-bump:
runs-on: ubuntu-latest
name: Apply Version Bump
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Apply Bump
shell: bash
run: |
bash ./scripts/bump_version.sh ${{ github.event.inputs.new_version }}

- uses: actions/checkout@v3
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
title: "Release Engineering: Version bump to ${{ github.event.inputs.new_version }}."
body: "This PR updates codeql-coding-standards to version ${{ github.event.inputs.new_version }}."
commit-message: "Version bump to ${{ github.event.inputs.new_version }}."
team-reviewers: github/codeql-coding-standards
delete-branch: true
branch: "codeql/version-bump-${{ github.event.inputs.new_version }}"
8 changes: 7 additions & 1 deletion scripts/release/create_draft_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@ python3 scripts/release/generate_release_notes.py > "$TEMP_DIR/release_notes_$VE
python3 scripts/release/create_supported_rules_list.py > "$TEMP_DIR/supported_rules_list_$VERSION.md"
python3 scripts/release/create_supported_rules_list.py --csv > "$TEMP_DIR/supported_rules_list_$VERSION.csv"

gh release create "v$VERSION" -d --target "$BRANCH" -F "$TEMP_DIR/release_notes_$VERSION.md" -t "v$VERSION" "$TEMP_DIR/$CODE_SCANNING_VERSIONED_ARTIFACT_NAME" "$TEMP_DIR/supported_rules_list_$VERSION.md" "$TEMP_DIR/supported_rules_list_$VERSION.csv" docs/user_manual.md
echo "Copy Docs to Artifact Directory"
cp docs/user_manual.md "$TEMP_DIR/user_manual_$VERSION.md"

echo "Generating Checksums"
sha256sum $TEMP_DIR/* > "$TEMP_DIR/checksums.txt"

gh release create "v$VERSION" -d --target "$BRANCH" -F "$TEMP_DIR/release_notes_$VERSION.md" -t "v$VERSION" "$TEMP_DIR/$CODE_SCANNING_VERSIONED_ARTIFACT_NAME" "$TEMP_DIR/supported_rules_list_$VERSION.md" "$TEMP_DIR/checksums.txt" "$TEMP_DIR/supported_rules_list_$VERSION.csv" "$TEMP_DIR/user_manual_$VERSION.md"

curl \
-X POST \
Expand Down