generated from quarkiverse/quarkiverse-template
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update snapshot release workflows (#983)
* feat: configure checked out ref Signed-off-by: Chris Laprun <[email protected]> * wip: check snapshot release Signed-off-by: Chris Laprun <[email protected]> * wip: switch to new release snapshot workflow Signed-off-by: Chris Laprun <[email protected]> * wip: rename to try to trigger it Signed-off-by: Chris Laprun <[email protected]> * wip: try to activate new snapshot workflow Signed-off-by: Chris Laprun <[email protected]> --------- Signed-off-by: Chris Laprun <[email protected]>
- Loading branch information
Showing
4 changed files
with
113 additions
and
43 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Release snapshot | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
branch: | ||
type: string | ||
required: false | ||
default: 'main' | ||
version: | ||
type: string | ||
required: false | ||
secrets: | ||
GPG_PRIVATE_KEY: | ||
required: true | ||
OSSRH_USERNAME: | ||
required: true | ||
OSSRH_TOKEN: | ||
required: true | ||
GPG_PASSPHRASE: | ||
required: true | ||
|
||
concurrency: | ||
group: "${{ github.workflow }}-${{ github.ref }}" | ||
cancel-in-progress: true | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
release-snapshot: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: "${{inputs.branch}}" | ||
|
||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
cache: 'maven' | ||
server-id: ossrh | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
gpg-passphrase: MAVEN_GPG_PASSPHRASE | ||
|
||
- name: Change version to "${{inputs.version}}" if needed | ||
if: ${{ inputs.version != '' }} | ||
run: | | ||
echo "Set version to ${{inputs.version}}" | ||
./mvnw versions:set -DnewVersion="${{inputs.version}}" versions:commit -Puse-snapshots | ||
- name: Output information | ||
run: echo "Release snapshot for branch ${{inputs.branch}} with version $(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" | ||
|
||
- name: Deploy maven snapshot | ||
run: | | ||
./mvnw -B deploy -DperformRelease -Dno-samples -Dno-docs -Prelease,use-snapshots | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |
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
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