Skip to content

Merge pull request #62 from merkle-open/develop #6

Merge pull request #62 from merkle-open/develop

Merge pull request #62 from merkle-open/develop #6

name: release and deploy
on:
push:
branches:
- master
jobs:
release:
runs-on: ubuntu-latest
steps:
# Checkout source code
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
# Setup Java environment
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: 11
distribution: zulu
# Install xmllint
- name: Install dependencies
run: sudo apt-get install libxml2-utils
# Set git username and email
- name: Set up Git
run: |
chmod +x ci/setup-git.sh
ci/setup-git.sh
# Release, set correct versions and create tag
- name: Release (versioning/tag)
run: |
chmod +x ci/mvn-release.sh
ci/mvn-release.sh
deploy-release:
needs: release
runs-on: ubuntu-latest
steps:
# Checkout source code
- name: Checkout
uses: actions/checkout@v4
with:
ref: 'master'
# Setup Java environment
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: 11
distribution: zulu
# Run maven verify
- name: Maven verify
run: mvn verify --batch-mode
# Publish
- name: Release Maven package
uses: samuelmeuli/action-maven-publish@v1
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
nexus_username: ${{ secrets.OSSRH_USER }}
nexus_password: ${{ secrets.OSSRH_PASSWORD }}