-
Notifications
You must be signed in to change notification settings - Fork 7
49 lines (42 loc) · 1.52 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
name: Release Build
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-20.04
if: github.repository == 'Restream/reindexer-java'
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Install Reindexer
run: |
curl https://repo.reindexer.io/RX-KEY.GPG | sudo apt-key add
echo 'deb https://repo.reindexer.io/ubuntu-focal /' | 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_1 }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD_1 }}