Skip to content

v0.1.4

v0.1.4 #35

name: publish-artifact
on:
release:
types: [released]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-20.04
environment: Treeverse signing
steps:
- name: Checkout
uses: actions/checkout@v3
- if: github.event.release
name: Create release tag
run: |
TAG=${{ github.event.release.tag_name }}
echo "TAG=${TAG#v}" >> $GITHUB_ENV
- if: github.event.release
name: Update version in pom.xml
run: mvn -B versions:set -DnewVersion=$TAG -DgenerateBackupPoms=false
- name: Set up Java and Maven Central Repository
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Build and publish package
run: mvn -DskipTests --batch-mode deploy --activate-profiles sign-artifacts
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }}