From 0219275de4a0f88646dc7dc664a2c0c4234e4af2 Mon Sep 17 00:00:00 2001 From: Chris Laprun Date: Wed, 30 Oct 2024 20:48:49 +0100 Subject: [PATCH 1/5] wip: check snapshot release Signed-off-by: Chris Laprun --- .github/workflows/deploy-snapshot.yml | 71 +++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .github/workflows/deploy-snapshot.yml diff --git a/.github/workflows/deploy-snapshot.yml b/.github/workflows/deploy-snapshot.yml new file mode 100644 index 00000000..6c9c0d3f --- /dev/null +++ b/.github/workflows/deploy-snapshot.yml @@ -0,0 +1,71 @@ +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 + 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 + 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 + if: ${{ inputs.version != '' }} + run: | + echo "Version override requested: ${{inputs.version}}" + echo "version=${{inputs.version}}" >> $GITHUB_OUTPUT + + 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}} \ No newline at end of file From 16e839e8b8c5d39ef69886812eaeed21ec82a562 Mon Sep 17 00:00:00 2001 From: Chris Laprun Date: Wed, 30 Oct 2024 20:51:07 +0100 Subject: [PATCH 2/5] wip: switch to new release snapshot workflow Signed-off-by: Chris Laprun --- .github/workflows/deploy-snapshot.yml | 71 --------------------------- 1 file changed, 71 deletions(-) delete mode 100644 .github/workflows/deploy-snapshot.yml diff --git a/.github/workflows/deploy-snapshot.yml b/.github/workflows/deploy-snapshot.yml deleted file mode 100644 index 6c9c0d3f..00000000 --- a/.github/workflows/deploy-snapshot.yml +++ /dev/null @@ -1,71 +0,0 @@ -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 - 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 - 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 - if: ${{ inputs.version != '' }} - run: | - echo "Version override requested: ${{inputs.version}}" - echo "version=${{inputs.version}}" >> $GITHUB_OUTPUT - - 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}} \ No newline at end of file From 1a15c1bb9bd4be5e20100bbfa98dc0eb9edd5274 Mon Sep 17 00:00:00 2001 From: Chris Laprun Date: Wed, 30 Oct 2024 21:07:25 +0100 Subject: [PATCH 3/5] wip: rename to try to trigger it Signed-off-by: Chris Laprun --- .github/workflows/{release-snapshot.yml => deploy-snapshot.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{release-snapshot.yml => deploy-snapshot.yml} (100%) diff --git a/.github/workflows/release-snapshot.yml b/.github/workflows/deploy-snapshot.yml similarity index 100% rename from .github/workflows/release-snapshot.yml rename to .github/workflows/deploy-snapshot.yml From 263b9345d8dfec733c188b70caa462ad37160979 Mon Sep 17 00:00:00 2001 From: Chris Laprun Date: Wed, 30 Oct 2024 21:11:42 +0100 Subject: [PATCH 4/5] wip: try to activate new snapshot workflow Signed-off-by: Chris Laprun --- .github/workflows/{deploy-snapshot.yml => release-snapshot.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{deploy-snapshot.yml => release-snapshot.yml} (100%) diff --git a/.github/workflows/deploy-snapshot.yml b/.github/workflows/release-snapshot.yml similarity index 100% rename from .github/workflows/deploy-snapshot.yml rename to .github/workflows/release-snapshot.yml From 6991ba042895bb3f8ba71257628eb6d509ff129c Mon Sep 17 00:00:00 2001 From: Chris Laprun Date: Wed, 30 Oct 2024 22:23:34 +0100 Subject: [PATCH 5/5] fix: properly declare output of prepare-version job Signed-off-by: Chris Laprun --- .github/workflows/release-snapshot.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-snapshot.yml b/.github/workflows/release-snapshot.yml index 6c9c0d3f..74be017a 100644 --- a/.github/workflows/release-snapshot.yml +++ b/.github/workflows/release-snapshot.yml @@ -37,6 +37,8 @@ concurrency: jobs: prepare-version: runs-on: ubuntu-latest + outputs: + version: ${{steps.snapshot-version.outputs.version}} steps: - uses: actions/checkout@v4 with: @@ -49,16 +51,22 @@ jobs: 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 - if: ${{ inputs.version != '' }} + id: snapshot-version run: | - echo "Version override requested: ${{inputs.version}}" - echo "version=${{inputs.version}}" >> $GITHUB_OUTPUT + 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