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
Changes from 4 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
75 changes: 75 additions & 0 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: 📦 Bump Workflow

on:
workflow_dispatch:
inputs:
temp_branch_name:
description: |
The branch to do the work in.
required: true

new_version:
description: |
The version to update to (eg: 2.6.0 or 2.6.0-dev).
required: true


jobs:
setup-branch:
runs-on: ubuntu-latest
name: ➕ Create Branch
needs: setup
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Create Branch
shell: pwsh
run: |
git checkout -b ${{ github.event.inputs.temp_branch_name }}
git push --set-upstream origin ${{ github.event.inputs.temp_branch_name }}

apply-version-bump:
runs-on: ubuntu-latest
name: 🎇 Apply Version Bump
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.temp_branch_name }}


- name: Apply Bump
shell: bash
run: |
find . -name 'qlpack.yml' | grep -v './codeql_modules' | grep -v './scripts' | xargs sed -i 's/^version.*$/version: ${{ github.event.inputs.new_version }}/'


- name: Push Performance Data
uses: EndBug/add-and-commit@v8
with:
add: '.'
pull: '--rebase --autostash'
author_name: John Singleton
author_email: jsinglet@github.com
default_author: github_actor
message: 'Version bump to ${{ github.event.inputs.new_version }}.'
pathspec_error_handling: ignore
push: true

create-pr:
runs-on: ubuntu-latest
name: 🎇 Create PR
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.temp_branch_name }}

- name: Create PR
shell: pwsh
run: |
gh pr create -b "Bump to Version ${{ github.event.inputs.new_version}}" -t "Bump to Version ${{ github.event.inputs.new_version}}"
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}