Skip to content

Commit

Permalink
Update publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
obar-zik authored Aug 5, 2024
1 parent 874f500 commit 93e333b
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,5 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Apache Maven Central
uses: actions/setup-java@v4
with: # running setup-java again overwrites the settings.xml
distribution: 'temurin'
java-version: '17'
cache: 'maven'
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_USERNAME # env variable for username in deploy
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
gpg-private-key: ${{ secrets.OB_MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase

- name: Publish to Apache Maven Central
run: |
git config user.name "ayoukhananov"
git config user.email "ayoukhananov@outbrain.com"
GPG_TTY=$(tty) mvn --batch-mode release:prepare release:perform -DskipSing=false
env:
MAVEN_USERNAME: ${{ secrets.OB_MAVEN_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.OB_MAVEN_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.OB_MAVEN_GPG_PASSPHRASE }}
publish:
uses: outbrain/.github-private/workflow-templates/publish-to-mevan-central.yaml

0 comments on commit 93e333b

Please sign in to comment.