Skip to content

Commit

Permalink
feat(ci): add release capabilities to publish job
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Latzelsperger <paul.latzelsperger@beardyinc.com>
  • Loading branch information
paullatzelsperger committed May 24, 2024
1 parent 64269f6 commit 36050f5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Nightly
name: Create and Publish Release

on:
workflow_dispatch:
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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-aws.yml@main
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()"
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release-tech-aws.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: Create Release of Technology-Aws
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:
Expand Down

0 comments on commit 36050f5

Please sign in to comment.