|
9 | 9 | schedule: |
10 | 10 | - cron: "0 3 * * *" # run at 03:00 UTC |
11 | 11 |
|
12 | | -env: |
13 | | - INPUT_VERSION: ${{ github.event.inputs.version || inputs.version }} |
14 | | - |
15 | 12 | jobs: |
16 | | - Secrets-Presence: |
17 | | - name: "Check for required credentials" |
18 | | - runs-on: ubuntu-latest |
19 | | - outputs: |
20 | | - HAS_OSSRH: ${{ steps.secrets-presence.outputs.HAS_OSSRH }} |
21 | | - HAS_WEBHOOK: ${{ steps.secrets-presence.outputs.HAS_WEBHOOK }} |
22 | | - steps: |
23 | | - - name: Check whether secrets exist |
24 | | - id: secrets-presence |
25 | | - run: | |
26 | | - [ ! -z "${{ secrets.ORG_GPG_PASSPHRASE }}" ] && |
27 | | - [ ! -z "${{ secrets.ORG_GPG_PRIVATE_KEY }}" ] && |
28 | | - [ ! -z "${{ secrets.ORG_OSSRH_USERNAME }}" ] && echo "HAS_OSSRH=true" >> $GITHUB_OUTPUT |
29 | | - [ ! -z "${{ secrets.DISCORD_GITHUB_CI_WEBHOOK }}" ] && echo "HAS_WEBHOOK=true" >> $GITHUB_OUTPUT |
30 | | - exit 0 |
31 | | -
|
32 | | - Determine-Version: |
33 | | - runs-on: ubuntu-latest |
34 | | - outputs: |
35 | | - VERSION: ${{ steps.get-version.outputs.VERSION }} |
36 | | - steps: |
37 | | - - uses: actions/checkout@v4 |
38 | | - - name: "Get version" |
39 | | - id: get-version |
40 | | - run: | |
41 | | - if [ -z ${{ env.INPUT_VERSION }} ]; then |
42 | | - echo "VERSION=$(IFS=.- read -r RELEASE_VERSION_MAJOR RELEASE_VERSION_MINOR RELEASE_VERSION_PATCH SNAPSHOT<<<$(grep "version" gradle.properties | awk -F= '{print $2}') && echo $RELEASE_VERSION_MAJOR.$RELEASE_VERSION_MINOR.$RELEASE_VERSION_PATCH-$(date +"%Y%m%d")-SNAPSHOT)" >> "$GITHUB_OUTPUT" |
43 | | - else |
44 | | - echo "VERSION=${{ env.INPUT_VERSION }}" >> "$GITHUB_OUTPUT" |
45 | | - fi |
46 | 13 |
|
47 | 14 | Run-Tests: |
48 | 15 | uses: ./.github/workflows/verify.yaml |
49 | 16 | secrets: inherit |
50 | 17 |
|
51 | | - Publish-Artefacts: |
52 | | - runs-on: ubuntu-latest |
53 | | - needs: [ Secrets-Presence, Run-Tests, Determine-Version ] |
54 | | - if: | |
55 | | - needs.Secrets-Presence.outputs.HAS_OSSRH |
56 | | - steps: |
57 | | - - uses: eclipse-edc/.github/.github/actions/publish-maven-artifacts@main |
58 | | - with: |
59 | | - version: ${{ needs.Determine-Version.outputs.VERSION }} |
60 | | - gpg-private-key: ${{ secrets.ORG_GPG_PRIVATE_KEY }} |
61 | | - gpg-passphrase: ${{ secrets.ORG_GPG_PASSPHRASE }} |
62 | | - osshr-username: ${{ secrets.ORG_OSSRH_USERNAME }} |
63 | | - osshr-password: ${{ secrets.ORG_OSSRH_PASSWORD }} |
64 | | - |
65 | | - Post-To-Discord: |
66 | | - needs: [ Publish-Artefacts, Determine-Version, Secrets-Presence ] |
67 | | - if: "needs.Secrets-Presence.outputs.HAS_WEBHOOK && always()" |
68 | | - runs-on: ubuntu-latest |
69 | | - steps: |
70 | | - - uses: sarisia/actions-status-discord@v1 |
71 | | - name: "Invoke discord webhook" |
72 | | - with: |
73 | | - webhook: ${{ secrets.DISCORD_GITHUB_CI_WEBHOOK }} |
74 | | - # if the publishing is skipped, that means the preceding test run failed |
75 | | - status: ${{ needs.Publish-Artefacts.result == 'skipped' && 'Failure' || needs.Publish-Artefacts.result }} |
76 | | - title: "Release Build Technology AZURE" |
77 | | - description: "Build and publish ${{ needs.Determine-Version.outputs.VERSION }}" |
78 | | - username: GitHub Actions |
| 18 | + Publish: |
| 19 | + if: always() |
| 20 | + needs: [ Run-Tests ] |
| 21 | + uses: eclipse-edc/.github/.github/workflows/technology-nightly.yml@main |
| 22 | + secrets: inherit |
| 23 | + with: |
| 24 | + version: ${{ inputs.version }} |
0 commit comments