File tree Expand file tree Collapse file tree 3 files changed +29
-13
lines changed Expand file tree Collapse file tree 3 files changed +29
-13
lines changed Original file line number Diff line number Diff line change 3838 MONGO_USERNAME : ${{ secrets.MONGO_USERNAME }}
3939 MONGO_PASSWORD : ${{ secrets.MONGO_PASSWORD }}
4040 SHORT_HASH : ${{ steps.var.outputs.sha_short }}
41- run : bin/release-binary.sh "master " "$SHORT_HASH " "$MONGO_URL " "$MONGO_USERNAME " "$MONGO_PASSWORD "
41+ run : bin/release-binary.sh "$MONGO_URL " "$MONGO_USERNAME " "$MONGO_PASSWORD " "$SHORT_HASH " "master "
Original file line number Diff line number Diff line change 55 - ' *'
66jobs :
77 build :
8+ name : " Stable Release"
89 runs-on : ubuntu-latest
10+ environment : production
11+ services :
12+ mongodb :
13+ image : mongo:3.2
14+ ports :
15+ - 27017:27017
916 steps :
1017 - uses : actions/checkout@v2
1118 - name : Run tests
1522 run : echo ::set-output name=tag::${GITHUB_REF#refs/*/}
1623 - name : Build artifacts
1724 run : ./gradlew -Penv=production -Prelease=${{ steps.var.outputs.tag }} clean assemble
18- - uses : ncipollo/release-action@v1
25+ - name : Release
26+ uses : ncipollo/release-action@v1
1927 with :
2028 artifacts : " build/distributions/sdkman-cli-*.zip"
2129 token : ${{ secrets.GITHUB_TOKEN }}
30+ - name : Update MongoDB
31+ env :
32+ MONGO_URL : ${{ secrets.MONGO_URL }}
33+ MONGO_USERNAME : ${{ secrets.MONGO_USERNAME }}
34+ MONGO_PASSWORD : ${{ secrets.MONGO_PASSWORD }}
35+ RELEASE_TAG : ${{ steps.var.outputs.tag }}
36+ run : bin/release-binary.sh "$MONGO_URL" "$MONGO_USERNAME" "$MONGO_PASSWORD" "$RELEASE_TAG" "stable"
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- BRANCH=" $1 "
4- SHORT_HASH=" $2 "
5- MONGO_URL=" $3 "
6- MONGO_USERNAME=" $4 "
7- MONGO_PASSWORD=" $5 "
8- VERSION=" $BRANCH +$SHORT_HASH "
3+ MONGO_URL=" $1 "
4+ MONGO_USERNAME=" $2 "
5+ MONGO_PASSWORD=" $3 "
6+ PARAM_1=" $4 "
7+ PARAM_2=" $5 "
8+
9+ echo " Mongo URL: $MONGO_URL "
910
1011if [[ -z " $MONGO_USERNAME " || -z " $MONGO_PASSWORD " ]]; then
1112 echo " No mongo credentials so doing nothing..."
1213 return 1
1314fi
1415
15- echo " Mongo URL: $MONGO_URL "
16-
17- if [[ " $BRANCH " == ' master' ]]; then
18- FIELD=" betaCliVersion"
19- else
16+ if [[ " $PARAM_2 " == ' stable' ]]; then
2017 FIELD=" stableCliVersion"
18+ VERSION=" $PARAM_1 "
19+ else
20+ FIELD=" betaCliVersion"
21+ VERSION=" master+$PARAM_1 "
2122fi
2223
2324echo " Release: $FIELD as $VERSION "
You can’t perform that action at this time.
0 commit comments