Skip to content

Commit e2b7477

Browse files
committed
Update synchronization of version numbers
1 parent d5ee36e commit e2b7477

1 file changed

Lines changed: 18 additions & 3 deletions

File tree

.github/workflows/deploy_and_release.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Deploy and Release CryptoAnalysis
22

33
on: [workflow_dispatch]
44

5+
env:
6+
BRANCH_NAME: snapshot_version
7+
58
jobs:
69
deployment:
710
runs-on: ubuntu-latest
@@ -46,7 +49,7 @@ jobs:
4649
name: released-files
4750
path: apps/
4851

49-
synchronize:
52+
snapshot-version:
5053
runs-on: ubuntu-latest
5154
needs: deployment
5255
steps:
@@ -55,9 +58,21 @@ jobs:
5558
with:
5659
fetch-depth: 0
5760

58-
- name: Synchronize master and develop
61+
- name: Create branch and update to next SNAPSHOT version
62+
run: |
63+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
64+
git config --global user.name "github-actions[bot]"
65+
git checkout -b ${{ env.BRANCH_NAME }} master
66+
mvn versions:set versions:commit -DnextSnapshot
67+
git ls-files | grep 'pom.xml$' | xargs git add
68+
git commit --allow-empty -am "Update version to next SNAPSHOT"
69+
git push origin ${{ env.BRANCH_NAME }}
70+
env:
71+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
73+
- name: Create PR for SNAPSHOT version
5974
run: |
60-
gh pr create -B develop -H master -t "Synchronize version in master and develop" -b "Update the version in `develop` from `master`"
75+
gh pr create --draft -B develop -H ${{ env.BRANCH_NAME }} -t "Update to next SNAPSHOT version" -b "Update to next SNAPSHOT version"
6176
env:
6277
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6378

0 commit comments

Comments
 (0)