Release #1
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: Release | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: Semantic Version string to use for this release | ||
required: true | ||
env: | ||
VERSION: ${{ github.event.inputs.version || inputs.version }} | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
Secrets-Presence: | ||
name: "Check for required credentials" | ||
runs-on: ubuntu-latest | ||
outputs: | ||
HAS_GH_PAT: ${{ steps.secrets-presence.outputs.HAS_GH_PAT }} | ||
HAS_WEBHOOK: ${{ steps.secrets-presence.outputs.HAS_WEBHOOK }} | ||
steps: | ||
- name: Check whether secrets exist | ||
id: secrets-presence | ||
run: | | ||
[ ! -z "${{ secrets.ORG_GITHUB_BOT_USER }}" ] && | ||
[ ! -z "${{ secrets.ORG_GITHUB_BOT_TOKEN }}" ] && echo "HAS_GH_PAT=true" >> $GITHUB_OUTPUT | ||
[ ! -z "${{ secrets.DISCORD_WEBHOOK_GITHUB }}" ] && echo "HAS_WEBHOOK=true" >> $GITHUB_OUTPUT | ||
exit 0 | ||
Run-All-Tests: | ||
name: "Run tests" | ||
runs-on: ubuntu-latest | ||
needs: [ Secrets-Presence ] | ||
if: | | ||
needs.Secrets-Presence.outputs.HAS_GH_PAT | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
test-def: [ { repo: "runtime-metamodel", workflowfile: "ci.yaml" }, | ||
{ repo: "gradleplugins", workflowfile: "test.yaml" }, | ||
{ repo: "connector", workflowfile: "verify.yaml" }, | ||
{ repo: "identityhub", workflowfile: "verify.yaml" }, | ||
{ repo: "federatedcatalog", workflowfile: "verify.yaml" }, | ||
{ repo: "technology-azure", workflowfile: "verify.yaml" }, | ||
{ repo: "technology-aws", workflowfile: "verify.yaml" }, | ||
{ repo: "technology-gcp", workflowfile: "verify.yaml" } ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: "Log version" | ||
run: | | ||
echo "Will build version ${{ env.VERSION }}" | ||
- name: "Run test for ${{ matrix.test-def.repo }}" | ||
run: | | ||
chmod +x ./scripts/github_action.sh | ||
./scripts/github_action.sh "eclipse-edc" "${{ matrix.test-def.repo }}" "${{ matrix.test-def.workflowfile}}" "" "${{ secrets.ORG_GITHUB_BOT_USER }}" "${{ secrets.ORG_GITHUB_BOT_TOKEN }}" | ||
Publish-Components: | ||
needs: [ Run-All-Tests ] | ||
uses: eclipse-edc/Release/.github/workflows/publish-all-in-one.yaml@main | ||
with: | ||
version: ${{ env.VERSION }} | ||
Check failure on line 66 in .github/workflows/release.yaml GitHub Actions / ReleaseInvalid workflow file
|
||
secrets: inherit | ||
Release-Components: | ||
name: "Release Components" | ||
runs-on: ubuntu-latest | ||
needs: [ Publish-Components ] | ||
if: | | ||
needs.Secrets-Presence.outputs.HAS_GH_PAT | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
test-def: [ { repo: "runtime-metamodel", workflowfile: "release-rm.yaml", versionfield: "edc_version" }, | ||
{ repo: "gradleplugins", workflowfile: "release-all-java.yaml", versionfield: "metamodel_version" }, | ||
{ repo: "connector", workflowfile: "release-edc.yaml", versionfield: "edc_version" }, | ||
{ repo: "identityhub", workflowfile: "release-identityhub.yaml", versionfield: "ih_version" }, | ||
{ repo: "federatedcatalog", workflowfile: "release-fcc.yaml", versionfield: "edc_version" }, | ||
{ repo: "technology-azure", workflowfile: "release-tech-az.yaml", versionfield: "edc_version" }, | ||
{ repo: "technology-aws", workflowfile: "release-tech-aws.yaml", versionfield: "edc_version" }, | ||
{ repo: "technology-gcp", workflowfile: "release-tech-gcp.yaml", versionfield: "edc_version" } ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: "Log version" | ||
run: | | ||
echo "Will release version ${{ env.VERSION }}" | ||
- name: "Release ${{ matrix.test-def.repo }}" | ||
run: | | ||
chmod +x ./scripts/github_action.sh | ||
./scripts/github_action.sh "eclipse-edc" "${{ matrix.test-def.repo }}" "${{ matrix.test-def.workflowfile}}" "{\"${{ matrix.test-def.versionfield }}\": \"${{ env.VERSION }}\"}" "${{ secrets.ORG_GITHUB_BOT_USER }}" "${{ secrets.ORG_GITHUB_BOT_TOKEN }}" | ||
- name: "Publish new SNAPSHOT version for ${{ matrix.test-def.repo }}" | ||
run: | | ||
chmod +x ./scripts/github_action.sh | ||
./scripts/github_action.sh "eclipse-edc" "${{ matrix.test-def.repo }}" "trigger_snapshot.yml" "" "${{ secrets.ORG_GITHUB_BOT_USER }}" "${{ secrets.ORG_GITHUB_BOT_TOKEN }}" | ||
Post-To-Discord: | ||
needs: [ Publish-Components, Secrets-Presence ] | ||
if: "needs.Secrets-Presence.outputs.HAS_WEBHOOK && always()" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: sarisia/actions-status-discord@v1 | ||
name: "Invoke discord webhook" | ||
with: | ||
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-Components.result }} | ||
title: "Nightly Build" | ||
description: "Build and publish ${{ env.VERSION }}" | ||
username: GitHub Actions |