Release Build #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | |
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} |