Commit 15439a9 1 parent 2b242d2 commit 15439a9 Copy full SHA for 15439a9
File tree 2 files changed +41
-0
lines changed
2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Check and update project version level
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+
8
+ jobs :
9
+ check-version-level-and-update :
10
+ if : github.repository == 'oncokb/oncokb-sop'
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - uses : actions/checkout@v2
14
+ with :
15
+ fetch-depth : 0
16
+ - name : ' Update Version Level'
17
+ run : |
18
+ git pull
19
+ VERSION_LEVEL=$(cat .version-level | tr "[:upper:]" "[:lower:]")
20
+
21
+ RELEASE_DRAFTER_MINOR='NEXT_MINOR_VERSION'
22
+ RELEASE_DRAFTER_PATCH='NEXT_PATCH_VERSION'
23
+
24
+ if [[ $VERSION_LEVEL == 'minor' ]]; then
25
+ sed -i "s/$RELEASE_DRAFTER_PATCH/$RELEASE_DRAFTER_MINOR/gi" .github/release-drafter.yml
26
+ fi
27
+
28
+ if [[ $VERSION_LEVEL == 'patch' ]]; then
29
+ sed -i "s/$RELEASE_DRAFTER_MINOR/$RELEASE_DRAFTER_PATCH/gi" .github/release-drafter.yml
30
+ fi
31
+
32
+ CHANGED=$(git diff --name-only HEAD --)
33
+ if [ -n "$CHANGED" ]
34
+ then
35
+ git config user.name oncokb-bot
36
+ git config user.email [email protected]
37
+ git add .
38
+ git commit -m "Update action files to align the version level to $VERSION_LEVEL"
39
+ git push -f
40
+ fi
Original file line number Diff line number Diff line change
1
+ patch
You can’t perform that action at this time.
0 commit comments