Skip to content

Commit

Permalink
Propagate OSSRH and GPG secrets into a release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvavrik committed Dec 12, 2024
1 parent 2e6ae36 commit 958fe95
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
16 changes: 12 additions & 4 deletions .github/actions/release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ inputs:
required: true
release-version:
description: 'Version under which should this framework be released'
ossrh-username:
required: true
ossrh-token:
required: true
gpg-passphrase:
required: true
gpg-private-key:
required: true
runs:
using: "composite"
steps:
Expand All @@ -18,7 +26,7 @@ runs:
server-id: ${{ inputs.repository-id }}
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-private-key: ${{ inputs.gpg-private-key }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Set Quarkus QE Test Framework version to ${{ inputs.release-version }}
shell: bash
Expand All @@ -33,9 +41,9 @@ runs:
-Prelease,framework \
clean deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
MAVEN_USERNAME: ${{ inputs.ossrh-username }}
MAVEN_PASSWORD: ${{ inputs.ossrh-token }}
MAVEN_GPG_PASSPHRASE: ${{ inputs.gpg-passphrase }}
- name: Delete Local Artifacts From Cache
shell: bash
run: rm -r ~/.m2/repository/io/quarkus/qe
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/daily-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ jobs:
- uses: ./.github/actions/release
with:
repository-id: 'ossrh'
release-version: '999-SNAPSHOT'
release-version: '999-SNAPSHOT'
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
ossrh-token: ${{ secrets.OSSRH_TOKEN }}
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
ossrh-username: ${{ secrets.OSSRH_USERNAME }}
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ jobs:
with:
repository-id: 'oss.sonatype'
release-version: ${{steps.metadata.outputs.current-version}}
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
ossrh-token: ${{ secrets.OSSRH_TOKEN }}
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
ossrh-username: ${{ secrets.OSSRH_USERNAME }}
- name: Configure Git
shell: bash
run: |
Expand Down

0 comments on commit 958fe95

Please sign in to comment.