-
Notifications
You must be signed in to change notification settings - Fork 7
45 lines (41 loc) · 1.54 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: release
on:
workflow_dispatch:
inputs:
releaseVersion:
description: "Release version"
required: true
default: "X.Y.Z"
jobs:
lightning-java:
runs-on: ubuntu-latest
if: github.repository == 'aerokube/lightning-java'
steps:
- uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSWORD
- name: Deploy release
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSWORD: ${{ secrets.MAVEN_GPG_PASSWORD }}
run: |
git config user.name $GITHUB_REPOSITORY
git config user.email "[email protected]"
mvn versions:set -DgenerateBackupPoms=false -DnewVersion=${{ github.event.inputs.releaseVersion }}
git commit -am "Updated version to ${{ github.event.inputs.releaseVersion }}"
git push origin master
git tag ${{ github.event.inputs.releaseVersion }}
git push origin ${{ github.event.inputs.releaseVersion }}
mvn clean deploy -P release
mvn versions:set -DgenerateBackupPoms=false -DnextSnapshot=true
git commit -am "Updated version to next snapshot"
git push origin master