Skip to content

Commit 79ef1a5

Browse files
committed
bump workflow
1 parent fde0df0 commit 79ef1a5

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed

.github/workflows/bump-version.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: 📦 Test Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
temp_branch_name:
7+
description: |
8+
The branch to do the work in.
9+
required: true
10+
11+
new_version:
12+
description: |
13+
The version to update to (eg: 2.6.0 or 2.6.0-dev).
14+
required: true
15+
16+
17+
jobs:
18+
setup-branch:
19+
runs-on: ubuntu-latest
20+
name: ➕ Create Branch
21+
needs: setup
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v2
25+
26+
- name: Create Branch
27+
shell: pwsh
28+
run: |
29+
git checkout -b ${{ github.event.inputs.temp_branch_name }}
30+
git push --set-upstream origin ${{ github.event.inputs.temp_branch_name }}
31+
32+
apply-version-bump:
33+
runs-on: ubuntu-latest
34+
name: 🎇 Apply Version Bump
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v2
38+
with:
39+
ref: ${{ github.event.inputs.temp_branch_name }}
40+
41+
42+
- name: Apply Bump
43+
shell: bash
44+
run: |
45+
find . -name 'qlpack.yml' | grep -v './codeql_modules' | grep -v './scripts' | sed -i 's/^version.*$/version: ${{ github.event.inputs.new_version }}/' ./c/cert/src/qlpack.yml
46+
47+
48+
- name: Push Performance Data
49+
uses: EndBug/add-and-commit@v8
50+
with:
51+
add: '.'
52+
pull: '--rebase --autostash'
53+
author_name: John Singleton
54+
author_email: jsinglet@github.com
55+
default_author: github_actor
56+
message: 'Version bump to ${{ github.event.inputs.new_version }}.'
57+
pathspec_error_handling: ignore
58+
push: true
59+
60+
create-pr:
61+
runs-on: ubuntu-latest
62+
name: 🎇 Create PR
63+
steps:
64+
- name: Checkout
65+
uses: actions/checkout@v2
66+
with:
67+
ref: ${{ github.event.inputs.temp_branch_name }}
68+
69+
- name: Create PR
70+
shell: pwsh
71+
run: |
72+
gh pr create -b "Bump to Version ${{ github.event.inputs.new_version}}" -t "Bump to Version ${{ github.event.inputs.new_version}}"
73+
env:
74+
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
75+

0 commit comments

Comments
 (0)