From cc8a804610c43e376fd6a48ad21e899e75318de9 Mon Sep 17 00:00:00 2001 From: jschwarz Date: Fri, 10 May 2024 13:05:10 +0200 Subject: [PATCH] use released parent add release action --- .github/workflows/release.yaml | 30 ++++++++++++++++++++++++++++++ deployment/global-settings.xml | 13 +++++++++++++ pom.xml | 17 +---------------- 3 files changed, 44 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/release.yaml create mode 100644 deployment/global-settings.xml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..85cc603 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,30 @@ +name: release + +on: + workflow_dispatch + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: set up jdk + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + server-id: github + gpg-private-key: ${{ secrets.ARTIFACT_SIGNING_GPG_PRIVATE_KEY }} + - name: Configure Git user + run: | + git config user.email "actions@github.com" + git config user.name "GitHub Actions" + - name: maven release + run: export GPG_TTY=$(tty) && mvn --batch-mode -e --global-settings deployment/global-settings.xml --batch-mode release:prepare release:perform + env: + GPG_KEY_NAME: ${{ secrets.ARTIFACT_SIGNING_GPG_KEY_NAME }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.ARTIFACT_SIGNING_GPG_PRIVATE_KEY_PASSWORD }} + OSSRH_JIRA_USERNAME: ${{ secrets.OSSRH_JIRA_USERNAME }} + OSSRH_JIRA_PASSWORD: ${{ secrets.OSSRH_JIRA_PASSWORD }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/deployment/global-settings.xml b/deployment/global-settings.xml new file mode 100644 index 0000000..020c17e --- /dev/null +++ b/deployment/global-settings.xml @@ -0,0 +1,13 @@ + + + + + ossrh + ${env.OSSRH_JIRA_USERNAME} + ${env.OSSRH_JIRA_PASSWORD} + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 7d10d9f..9c2c8eb 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ de.eitco eitco-oss-parent - 0.0.1-SNAPSHOT + 0.0.1 @@ -41,21 +41,6 @@ - - - github - https://maven.pkg.github.com/eitco/eitco-oss-parent - - false - - - true - fail - never - - - -