-
Notifications
You must be signed in to change notification settings - Fork 4
71 lines (64 loc) · 2.33 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Release
on:
push:
branches: [ main ]
tags: [ '*' ]
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.value }}
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Parse release version
id: version
uses: madhead/[email protected]
with:
file: gradle.properties
property: libraryVersion
release:
needs: prepare
# Only proceed for tagged releases and snapshots:
if: startsWith(github.ref, 'refs/tags/') || endsWith(needs.prepare.outputs.version, '-SNAPSHOT')
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Install JDK 11
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 11
- name: Gradle cache
uses: gradle/gradle-build-action@v2
- name: Assemble for release
run: ./gradlew clean assembleRelease --stacktrace
- name: Publish
env:
ORG_GRADLE_PROJECT_backbaseOssSonatypeUsername: ${{ secrets.ORG_GRADLE_PROJECT_backbaseOssSonatypeUsername }}
ORG_GRADLE_PROJECT_backbaseOssSonatypePassword: ${{ secrets.ORG_GRADLE_PROJECT_backbaseOssSonatypePassword }}
ORG_GRADLE_PROJECT_backbaseOssGpgKey: ${{ secrets.ORG_GRADLE_PROJECT_backbaseOssGpgKey }}
ORG_GRADLE_PROJECT_backbaseOssGpgPassword: ${{ secrets.ORG_GRADLE_PROJECT_backbaseOssGpgPassword }}
run: ./gradlew publishReleasePublicationToMavenCentralRepository --stacktrace
prepare-next-development-version:
needs: release
runs-on: ubuntu-latest
# Only proceed for tagged releases:
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Check out the repo
uses: actions/checkout@v2
with:
token: ${{ secrets.ACCESS_TOKEN }}
- name: Bump to next development version
run: ./gradlew bumpToNextDevelopmentVersion
- name: Push version to main
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Prepare next development version
branch: main
file_pattern: gradle.properties
commit_author: GitHub Actions <[email protected]>