-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.65 KB
/
release-build-workflow.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
name: Release Build
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
if: github.repository == 'evgeniycheban/spring-data-reindexer'
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
# TODO: Repo's SSL certificate has expired.
# - name: Install Reindexer
# run: |
# curl https://repo.reindexer.io/RX-KEY.GPG | sudo apt-key add
# echo 'deb https://repo.reindexer.io/ubuntu-bionic /' | sudo tee -a /etc/apt/sources.list
# sudo apt-get update
# sudo apt-get install reindexer-dev
- name: Prepare release
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
mvn --batch-mode release:prepare -Psign-artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Apache Maven Central
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: sonatype-nexus-staging
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Perform release
run: mvn --batch-mode release:perform -Psign-artifacts
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}