diff --git a/.github/workflows/nightly.yaml b/.github/workflows/publish.yaml similarity index 89% rename from .github/workflows/nightly.yaml rename to .github/workflows/publish.yaml index 4450dd7..a263aca 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/publish.yaml @@ -1,4 +1,4 @@ -name: Nightly +name: Create and Publish Release on: workflow_dispatch: @@ -29,6 +29,7 @@ jobs: [ ! -z "${{ secrets.DISCORD_WEBHOOK_GITHUB }}" ] && echo "HAS_WEBHOOK=true" >> $GITHUB_OUTPUT exit 0 + Determine-Version: runs-on: ubuntu-latest outputs: @@ -44,6 +45,7 @@ jobs: echo "VERSION=${{ env.INPUT_VERSION }}" >> "$GITHUB_OUTPUT" fi + Run-Tests: needs: [ Secrets-Presence, Determine-Version ] uses: ./.github/workflows/verify.yaml @@ -83,6 +85,15 @@ jobs: echo "Publishing Version $VERSION to Sonatype" ./gradlew publishToSonatype ${cmd} --no-parallel -Pversion=$VERSION -Psigning.gnupg.executable=gpg -Psigning.gnupg.passphrase="${{ secrets.ORG_GPG_PASSPHRASE }}" + + # If we have a release version, also invoke the GH release job, bump versions, etc. + Create-GitHub-Release: + needs: [ Publish-Artefacts, Determine-Version ] + if: ${{ !endsWith(needs.Determine-Version.outputs.VERSION, '-SNAPSHOT') }} + uses: ./.github/workflows/release-tech-gcp.yml + with: + edc_version: ${{ needs.Determine-Version.outputs.VERSION }} + Post-To-Discord: needs: [ Publish-Artefacts, Determine-Version, Secrets-Presence ] if: "needs.Secrets-Presence.outputs.HAS_WEBHOOK && always()" @@ -94,6 +105,6 @@ jobs: webhook: ${{ secrets.DISCORD_WEBHOOK_GITHUB }} # if the publishing is skipped, that means the preceding test run failed status: ${{ needs.Publish-Components.result == 'skipped' && 'Failure' || needs.Publish-Artefacts.result }} - title: "Nightly Build Technology GCP" + title: "Release Build Technology GCP" description: "Build and publish ${{ needs.Determine-Version.outputs.VERSION }}" username: GitHub Actions \ No newline at end of file diff --git a/.github/workflows/release-tech-gcp.yml b/.github/workflows/release-tech-gcp.yml index 48a01af..57dce2a 100644 --- a/.github/workflows/release-tech-gcp.yml +++ b/.github/workflows/release-tech-gcp.yml @@ -1,5 +1,11 @@ name: Create Release of Technology-GCP on: + workflow_call: + inputs: + edc_version: + description: 'Version string that is used for publishing (e.g. "1.0.0", NOT "v1.0.0"). Appending -SNAPSHOT will create a snapshot release.' + required: true + type: string workflow_dispatch: inputs: edc_version: