Delete application-test-root-S3.yml #51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish SNAPSHOT to Sonatype | |
on: | |
push: | |
branches: | |
- 'main' | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Java & Maven | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
server-id: ossrh | |
# User/pass refer to ENV VARs set below | |
server-username: MAVEN_USERNAME # Sonatype user | |
server-password: MAVEN_PASSWORD # Sonatype password # env variable for GPG private key passphrase | |
gpg-private-key: ${{ secrets.MAVEN_GPG_KEY }} | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
- name: Get project version | |
id: project_version | |
# run: echo ::set-output name=version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) | |
run: echo "VERSION=`mvn help:evaluate -Dexpression=project.version -q -DforceStdout`" >> $GITHUB_OUTPUT | |
- name: Publish SNAPSHOT | |
# Only execute for -SNAPSHOT versions | |
if: ${{ endsWith(steps.project_version.outputs.version, '-SNAPSHOT') }} | |
run: mvn -B --no-transfer-progress clean deploy | |
env: | |
# Add OSSRH_USERNAME and OSSRH_PASSWORD as GH secrets | |
# https://docs.github.com/en/actions/security-guides/encrypted-secrets | |
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} |