Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Merge pull request #11 from shaishap/main #8

Merge pull request #11 from shaishap/main

Merge pull request #11 from shaishap/main #8

Workflow file for this run

name: Build, Deploy, Release - maven central
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Set up Apache Maven Central
uses: actions/setup-java@v3
with: # configure settings.xml
distribution: 'temurin'
java-version: '11'
server-id: ossrh
server-username: MVN_DEPLOY_USER
server-password: MVN_DEPLOY_PASSWORD
gpg-private-key: ${{ secrets.ORG_GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: Build and Publish to Apache Maven Central
run: |
cat /home/runner/.m2/settings.xml
mvn clean deploy
env:
MVN_DEPLOY_USER: ${{ secrets.ORG_OSSRH_USERNAME }}
MVN_DEPLOY_PASSWORD: ${{ secrets.ORG_OSSRH_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.ORG_GPG_PASSPHRASE }}
- name: Get package version
run: |
PKGVER=$(mvn org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version | grep -v INFO | grep -E "\d")
git tag -d "$PKGVER" || true
git tag -a -m "auto-created by CI" "$PKGVER"
git push origin --tags