Skip to content

Commit

Permalink
add new release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tomix26 committed Feb 7, 2022
1 parent 60b2317 commit 69c9b08
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 10 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release
on:
milestone:
types: [closed]
jobs:
build:
name: Release ${{ github.event.milestone.title }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: master
fetch-depth: 0
- name: Set up Git
run: |
git config user.name "Zonky Bot"
git config user.email "[email protected]"
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 8
server-id: ossrh
server-username: MAVEN_USER
server-password: MAVEN_PASS
gpg-private-key: ${{ secrets.SIGNING_CERT }}
gpg-passphrase: SIGNING_PASS
- name: Release with Maven
env:
RELEASE_VERSION: ${{ github.event.milestone.title }}
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}
SIGNING_PASS: ${{ secrets.SIGNING_PASS }}
run: mvn -B release:prepare release:perform -DreleaseVersion=$RELEASE_VERSION
15 changes: 5 additions & 10 deletions .github/workflows/maven.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Java CI
name: Checks
on: [push, pull_request]
jobs:
build:
Expand All @@ -9,17 +9,12 @@ jobs:
java: [8, 11, 13, 14, 15]
steps:
- name: Checkout project
uses: actions/checkout@v1
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}
- name: Cache Maven repository
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
cache: 'maven'
- name: Build with Maven
run: mvn -B test

0 comments on commit 69c9b08

Please sign in to comment.