-
Notifications
You must be signed in to change notification settings - Fork 38
58 lines (52 loc) · 2.06 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
# This workflow creates a running release please PR, which tracks all changes
# based on semantic PR titles. When that PR is merged, a publish occurs after
# release please increments the version.
on:
push:
branches:
- main
name: Run Release Please
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
jobs:
release-please:
permissions:
contents: write # for google-github-actions/release-please-action to create release commit
pull-requests: write # for google-github-actions/release-please-action to create release PR
runs-on: ubuntu-latest
# Release-please creates a PR that tracks all changes
steps:
- uses: google-github-actions/release-please-action@2921787898ea2925c9eec03a32aa7404a75399e5
id: release
with:
command: manifest
token: ${{secrets.GITHUB_TOKEN}}
default-branch: main
# These steps are only run if this was a merged release-please PR
- name: checkout
if: ${{ steps.release.outputs.releases_created }}
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Set up JDK 8
if: ${{ steps.release.outputs.releases_created }}
uses: actions/setup-java@78078da0cd035d0d177cc2cb696e05d96fba7d11
with:
java-version: '8'
distribution: 'temurin'
cache: maven
server-id: ossrh
server-username: ${{ secrets.OSSRH_USERNAME }}
server-password: ${{ secrets.OSSRH_PASSWORD }}
- name: Configure GPG Key
if: ${{ steps.release.outputs.releases_created }}
run: |
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --import
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
- name: Deploy
if: ${{ steps.release.outputs.releases_created }}
run: |
mvn --batch-mode \
--settings release/m2-settings.xml clean deploy
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}