-
Notifications
You must be signed in to change notification settings - Fork 6
45 lines (41 loc) · 1.62 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
name: Java Release (Master)
on:
release:
types:
- published
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: ossrh
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD
- name: Build with Maven
run: |
git config --global user.name "ais-swe-ci"
git config --global user.email "[email protected]"
git checkout master
git checkout develop
echo -n $SIGNING_PRIVATE | base64 -di > ~/private.asc
gpg --pinentry-mode loopback --batch --no-tty --yes --passphrase $SIGNING_PASSPHRASE --import ~/private.asc
export VERSION_TAG=`echo $GITHUB_REF | sed -n -e "s/.*\///gp"`
mvn -B clean build-helper:parse-version jgitflow:release-start -DreleaseVersion=$VERSION_TAG $MAVEN_ARGS
mvn -B jgitflow:release-finish -Dgpg.passphrase=$SIGNING_PASSPHRASE $MAVEN_ARGS
git checkout develop
git commit --amend -m '[skip-ci] Updating develop poms back to pre merge state'
git push --all --follow-tags
env:
SIGNING_PRIVATE: ${{ secrets.SIGNING_PRIVATE }}
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
OSSRH_USERNAME: aitci
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
MAVEN_ARGS: -DallowSnapshots=false -DallowUntracked=true -Psign-artifacts
# TODO: add steps to:
# - Version POMs
# - Update POM to next Snapshot version (on develop branch)
# - Add released artifacts to the release (publish) that started this build