diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml new file mode 100644 index 0000000000..509ac3b4d1 --- /dev/null +++ b/.github/workflows/bump-version.yml @@ -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 }}" diff --git a/scripts/release/create_draft_release.sh b/scripts/release/create_draft_release.sh index 9594c57290..fa3000d450 100755 --- a/scripts/release/create_draft_release.sh +++ b/scripts/release/create_draft_release.sh @@ -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 \