Skip to content

Commit d022445

Browse files
committed
ci: update ci workflow to push version updates to release branch
1 parent c80ae5b commit d022445

File tree

2 files changed

+36
-28
lines changed

2 files changed

+36
-28
lines changed

.github/workflows/maven-publish.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,9 @@ name: Maven Publish
22

33
on:
44
workflow_dispatch:
5-
inputs:
6-
libraryVersion:
7-
description: 'Library Version'
8-
required: true
9-
default: ''
10-
packageVersion:
11-
description: 'Package Version'
12-
required: true
13-
default: ''
145

156
jobs:
16-
update-version:
17-
runs-on: ubuntu-latest
18-
steps:
19-
- name: Checkout code
20-
uses: actions/checkout@v2
21-
22-
- name: Update Version
23-
run: |
24-
sed -i '/VERSION=/!b;cVERSION=\"v${{ github.event.inputs.libraryVersion }}";' ./download-libs.sh
25-
- name: Commit, Tag and Push
26-
run: |
27-
git add ./download-libs.sh
28-
git config user.name github-actions
29-
git config user.email [email protected]
30-
git commit -m "updated version" | exit 0
31-
git tag ${{ github.event.inputs.packageVersion }}
32-
git push & git push --tags
33-
347
publish:
35-
needs: update-version
368
runs-on: ubuntu-latest
379
steps:
3810
- uses: actions/checkout@v2
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Update version
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
libraryVersion:
7+
description: 'Library Version'
8+
required: true
9+
default: ''
10+
packageVersion:
11+
description: 'Package Version'
12+
required: true
13+
default: ''
14+
15+
jobs:
16+
update-version:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v2
21+
22+
- name: Create new branch
23+
run: git checkout -b release/${{ github.event.inputs.packageVersion }}
24+
25+
- name: Update Version
26+
run: |
27+
sed -i '/VERSION=/!b;cVERSION=\"v${{ github.event.inputs.libraryVersion }}";' ./download-libs.sh
28+
- name: Commit, Tag and Push
29+
run: |
30+
git add ./download-libs.sh
31+
git config user.name github-actions
32+
git config user.email [email protected]
33+
git commit -m "updated version" | exit 0
34+
git tag ${{ github.event.inputs.packageVersion }}
35+
git push --set-upstream origin release/${{ github.event.inputs.packageVersion }}
36+
git push --tags

0 commit comments

Comments
 (0)