-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d4d644c
commit 34a0009
Showing
1 changed file
with
29 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,42 @@ | ||
name: 'Bump version and make master job' | ||
on: | ||
pull_request: | ||
types: [opened, edited, reopened, synchronize] | ||
push: | ||
branches: | ||
- 'develop' | ||
- 'update-bencher' | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
# version-bump: | ||
# name: 'Version Bump' | ||
# runs-on: ubuntu-20.04 | ||
# steps: | ||
# - name: 'Check out code' | ||
# uses: actions/checkout@v3 | ||
# with: | ||
# token: ${{ secrets.JENKINS_GITHUB_PAT }} | ||
# # fetch-depth 0 means deep clone the repo | ||
# fetch-depth: 0 | ||
# - name: 'Update Version' | ||
# run: | | ||
# set -x | ||
# git config user.name devops | ||
# git config user.email [email protected] | ||
# git checkout -B master origin/master | ||
# old_develop="$(git merge-base origin/develop origin/master)" | ||
# new_develop="$(git rev-parse origin/develop)" | ||
# if git diff --exit-code ${old_develop} ${new_develop} -- package/version; then | ||
# git merge --no-edit origin/develop | ||
# ./package/version.sh bump | ||
# else | ||
# git merge --no-edit --strategy-option=theirs origin/develop | ||
# fi | ||
# ./package/version.sh sub | ||
# if git add --update && git commit --no-edit --allow-empty --message "Set Version: $(cat package/version)"; then | ||
# git push origin master | ||
# fi | ||
version-bump: | ||
name: 'Version Bump' | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: 'Check out code' | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.JENKINS_GITHUB_PAT }} | ||
# fetch-depth 0 means deep clone the repo | ||
fetch-depth: 0 | ||
- name: 'Update Version' | ||
run: | | ||
set -x | ||
git config user.name devops | ||
git config user.email [email protected] | ||
git checkout -B master origin/master | ||
old_develop="$(git merge-base origin/develop origin/master)" | ||
new_develop="$(git rev-parse origin/develop)" | ||
if git diff --exit-code ${old_develop} ${new_develop} -- package/version; then | ||
git merge --no-edit origin/develop | ||
./package/version.sh bump | ||
else | ||
git merge --no-edit --strategy-option=theirs origin/develop | ||
fi | ||
./package/version.sh sub | ||
if git add --update && git commit --no-edit --allow-empty --message "Set Version: $(cat package/version)"; then | ||
git push origin master | ||
fi | ||
post-performance-tests: | ||
name: 'Performace Tests' | ||
|