Skip to content

Commit 69c9b08

Browse files
committed
add new release workflow
1 parent 60b2317 commit 69c9b08

File tree

2 files changed

+40
-10
lines changed

2 files changed

+40
-10
lines changed

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Release
2+
on:
3+
milestone:
4+
types: [closed]
5+
jobs:
6+
build:
7+
name: Release ${{ github.event.milestone.title }}
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v2
12+
with:
13+
ref: master
14+
fetch-depth: 0
15+
- name: Set up Git
16+
run: |
17+
git config user.name "Zonky Bot"
18+
git config user.email "bot@zonky.com"
19+
- name: Set up JDK
20+
uses: actions/setup-java@v2
21+
with:
22+
distribution: 'zulu'
23+
java-version: 8
24+
server-id: ossrh
25+
server-username: MAVEN_USER
26+
server-password: MAVEN_PASS
27+
gpg-private-key: ${{ secrets.SIGNING_CERT }}
28+
gpg-passphrase: SIGNING_PASS
29+
- name: Release with Maven
30+
env:
31+
RELEASE_VERSION: ${{ github.event.milestone.title }}
32+
MAVEN_USER: ${{ secrets.MAVEN_USER }}
33+
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}
34+
SIGNING_PASS: ${{ secrets.SIGNING_PASS }}
35+
run: mvn -B release:prepare release:perform -DreleaseVersion=$RELEASE_VERSION
Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Java CI
1+
name: Checks
22
on: [push, pull_request]
33
jobs:
44
build:
@@ -9,17 +9,12 @@ jobs:
99
java: [8, 11, 13, 14, 15]
1010
steps:
1111
- name: Checkout project
12-
uses: actions/checkout@v1
12+
uses: actions/checkout@v2
1313
- name: Set up JDK
14-
uses: actions/setup-java@v1
14+
uses: actions/setup-java@v2
1515
with:
16+
distribution: 'zulu'
1617
java-version: ${{ matrix.java }}
17-
- name: Cache Maven repository
18-
uses: actions/cache@v1
19-
with:
20-
path: ~/.m2/repository
21-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
22-
restore-keys: |
23-
${{ runner.os }}-maven-
18+
cache: 'maven'
2419
- name: Build with Maven
2520
run: mvn -B test

0 commit comments

Comments
 (0)