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

Commit

Permalink
Use external release action
Browse files Browse the repository at this point in the history
  • Loading branch information
QubitPi committed Apr 3, 2024
1 parent 002a51f commit d93add6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 55 deletions.
56 changes: 9 additions & 47 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,55 +122,17 @@ jobs:
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/athena-example-books:latest

push-release-tag:
name: Bump Semantic Version
if: github.ref == 'refs/heads/master'
needs: tests
uses: QubitPi/hashicorp-aws/.github/workflows/version-bump.yml@master
with:
user: QubitPi
email: jack20220723@gmail.com

release:
name: Release athena to Maven Central
name: Release
if: github.ref == 'refs/heads/master'
needs: push-release-tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: QubitPi/hashicorp-aws/.github/actions/jdk-setup@master
- name: Configure settings.xml for Maven Central release
uses: whelk-io/maven-settings-xml-action@v20
with:
servers: >
[
{
"id": "paion-data",
"username": "${{ secrets.MAVEN_CENTRAL_USERNAME }}",
"password": "${{ secrets.MAVEN_CENTRAL_TOKEN }}",
"passphrase": "${{ secrets.GPG_PASSPHRASE }}"
}
]
profiles: >
[
{
"id": "paion-data",
"properties": {
"gpg.keyname": "paion-data"
}
"activation": {
"activeByDefault": "true"
}
}
]
- name: Fetch GPG key
run: gpg --keyserver keyserver.ubuntu.com --recv-keys ${{ secrets.GPG_PUB_KEY }}
- name: Bump version
run: |
VERSION=$(git describe)
echo "INFO Last tag: $VERSION"
mvn versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false
mvn versions:update-property -Dproperty=version.athena -DnewVersion=$VERSION -DgenerateBackupPoms=false
- name: Release
run: mvn clean deploy -P release -DskipTests
uses: QubitPi/maven-central-release-action@master
with:
user: QubitPi
email: jack20220723@gmail.com
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
server-username: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
server-password: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
8 changes: 0 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,6 @@
</license>
</licenses>

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub QubitPi Apache Maven Packages</name>
<url>https://maven.pkg.github.com/paiondata/athena</url>
</repository>
</distributionManagement>

<scm>
<developerConnection>scm:git:ssh://git@github.com/paion-data/athena.git</developerConnection>
<url>https://github.com/paion-data/athena.git</url>
Expand Down

0 comments on commit d93add6

Please sign in to comment.