-
Notifications
You must be signed in to change notification settings - Fork 8
47 lines (42 loc) · 1.48 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: AttachExtended Release
on:
push:
tags:
- '*'
jobs:
build:
name: Deploy
runs-on: macos-11
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 5
persist-credentials: false
- name: Setup Java 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Deploy Release
run: |
export ANDROID_SDK=$ANDROID_HOME
./gradlew publish -PgluonNexusDeployUsername=$NEXUS_DEPLOY_USERNAME -PgluonNexusDeployPassword=$NEXUS_DEPLOY_PASSWORD
env:
NEXUS_DEPLOY_USERNAME: ${{ secrets.NEXUS_DEPLOY_USERNAME }}
NEXUS_DEPLOY_PASSWORD: ${{ secrets.NEXUS_DEPLOY_PASSWORD }}
- name: Commit next development version
if: steps.deploy.outputs.exit_code == 0
run: |
brew install gnu-sed
git config user.email "githubbot@gluonhq.com"
git config user.name "Gluon Bot"
TAG=${GITHUB_REF/refs\/tags\//}
newVersion=${TAG%.*}.$((${TAG##*.} + 1)) # Update version by 1
gsed -i -z "0,/version = $TAG/s//version = $newVersion-SNAPSHOT/" gradle.properties
git commit gradle.properties -m "Prepare development of $newVersion"
git push https://gluon-bot:$PAT@github.com/$GITHUB_REPOSITORY HEAD:master
env:
PAT: ${{ secrets.GITHUB_TOKEN }}