Deploy Snapshot #2
Workflow file for this run
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: Deploy Snapshot | |
on: | |
workflow_dispatch: | |
inputs: | |
branch: | |
type: string | |
required: false | |
default: 'main' | |
version: | |
type: string | |
required: false | |
workflow_call: | |
inputs: | |
branch: | |
type: string | |
required: false | |
default: 'main' | |
version: | |
type: string | |
required: false | |
defaults: | |
run: | |
shell: bash | |
permissions: | |
attestations: write | |
id-token: write | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
prepare-version: | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{steps.snapshot-version.outputs.version}} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: "${{inputs.branch}}" | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 21 | |
cache: 'maven' | |
- name: Retrieve and export project version | |
id: project-version | |
run: | | |
version=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout) | |
echo "Project version: ${version}" | |
echo "version=${version}" >> $GITHUB_OUTPUT | |
- name: Override project version if requested | |
id: snapshot-version | |
run: | | |
if [ -z "${{inputs.version}}" ]; | |
then | |
echo "version=${{steps.project-version.outputs.version}}" >> $GITHUB_OUTPUT | |
else | |
echo "Version override requested: ${{inputs.version}}" | |
echo "version=${{inputs.version}}" >> $GITHUB_OUTPUT | |
fi | |
deploy-snapshot: | |
name: Deploy Snapshots | |
uses: quarkiverse/.github/.github/workflows/perform-release.yml@main | |
secrets: inherit | |
needs: | |
- prepare-version | |
with: | |
ref: main | |
version: ${{needs.prepare-version.outputs.version}} |