Skip to content

Merge pull request #164 from DelineaXPM/dependabot/maven/net.sourcefo… #108

Merge pull request #164 from DelineaXPM/dependabot/maven/net.sourcefo…

Merge pull request #164 from DelineaXPM/dependabot/maven/net.sourcefo… #108

Workflow file for this run

name: Deploy
on:
push:
# Publish `v1.2.3` tags as releases.
tags:
- v*
branches:
- main
jobs:
push:
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up JDK 17
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4
with:
java-version: 17
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE # env variable for GPG private key passphrase
distribution: 'temurin'
- name: Customize the Maven settings.xml
uses: whelk-io/maven-settings-xml-action@9dc09b23833fa9aa7f27b63db287951856f3433d # v22
with:
servers: '[{ "id": "ossrh", "username": "${{ secrets.SONATYPE_USERNAME }}", "password": "${{ secrets.SONATYPE_PASSWORD }}" }, { "id": "ossrh", "username": "${{ secrets.SONATYPE_USERNAME }}", "password": "${{ secrets.SONATYPE_PASSWORD }}" }]'
- name: Configure the application
run: |
properties="src/main/resources/application.properties"
rm -f "${properties}"
echo "secret_server.tenant = ${{ secrets.TSS_TENANT }}" >> "${properties}"
echo "secret_server.oauth2.username = ${{ secrets.TSS_USERNAME }}" >> "${properties}"
echo "secret_server.oauth2.password = ${{ secrets.TSS_PASSWORD }}" >> "${properties}"
echo "secret.id = ${{ secrets.TSS_SECRET_ID }}" >> "${properties}"
- name: Deploy with Maven
run: |
mvn -P github -B -C -ff -ntp -U deploy -Dregistry=https://maven.pkg.github.com/delineaXPM -Dtoken=${{ secrets.GH_TOKEN }} -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}"