From cbd643a7206b72698378beb9ded31ed992b9bfd7 Mon Sep 17 00:00:00 2001 From: Michele Santoro Date: Mon, 17 Jun 2024 14:48:39 +0200 Subject: [PATCH 1/3] Remove condition for releasing samm cli --- .github/workflows/release-workflow.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/release-workflow.yml b/.github/workflows/release-workflow.yml index f085b5275..2d2ec5c8e 100644 --- a/.github/workflows/release-workflow.yml +++ b/.github/workflows/release-workflow.yml @@ -322,7 +322,6 @@ jobs: # Sign SAML-CLI Windows executable - name: Get Artifact ID (Windows) - if: matrix.os == 'windows-latest' shell: bash run: | # Get the list of artifacts for the specified workflow run @@ -337,7 +336,6 @@ jobs: TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Commit Artifact url and version changes and push to pre release branch for jenkins (Windows) - if: matrix.os == 'windows-latest' shell: bash run: | ARTIFACT_URL_WIN="https://api.github.com/repos/eclipse-esmf/esmf-sdk/actions/artifacts/$ARTIFACT_ID/zip" @@ -356,7 +354,6 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Trigger Jenkins Job, for signing executable - if: matrix.os == 'windows-latest' shell: bash run: | DATA='{"repository": {"url": "https://github.com/eclipse-esmf/esmf-sdk", "html_url": "https://github.com/eclipse-esmf/esmf-sdk", "owner": { "name": "ESMF"}}, "pusher": { "name": "GitHub Action", "email": "esmf-dev@eclipse.org"}}' From d0d79f8329ef183bdff6dd5bad34abc52f82da64 Mon Sep 17 00:00:00 2001 From: "Textor Andreas (BCI/ESW17)" Date: Mon, 17 Jun 2024 15:09:55 +0200 Subject: [PATCH 2/3] Add macos to release dependencies --- .github/workflows/release-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-workflow.yml b/.github/workflows/release-workflow.yml index 2d2ec5c8e..2ddd30e34 100644 --- a/.github/workflows/release-workflow.yml +++ b/.github/workflows/release-workflow.yml @@ -280,7 +280,7 @@ jobs: release: name: Release - needs: [build-linux, build-windows] + needs: [build-linux, build-windows, build-macos] runs-on: ubuntu-latest steps: # Need to checkout here too, so that we have the pom.xml From ddca775e4abe091b909f8e8a958ec75ff0d5f007 Mon Sep 17 00:00:00 2001 From: "Textor Andreas (BCI/ESW17)" Date: Mon, 17 Jun 2024 15:10:16 +0200 Subject: [PATCH 3/3] First do GH release, then trigger Jenkins Windows build So that Jenkins trying to push the signed .exe will always have the GH release available to push to --- .github/workflows/release-workflow.yml | 98 +++++++++++++------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/.github/workflows/release-workflow.yml b/.github/workflows/release-workflow.yml index 2ddd30e34..f929b50a7 100644 --- a/.github/workflows/release-workflow.yml +++ b/.github/workflows/release-workflow.yml @@ -320,6 +320,54 @@ jobs: with: name: mac-artifacts + - name: Set versions + continue-on-error: true + run: | + release_version=${{ github.event.inputs.release_version }} + release_branch_name=${release_version%.*}.x + echo "release_branch_name=$release_branch_name" >> $GITHUB_ENV + + # Set version in pom.xml files + mvn -B clean install -DskipTests -Dmaven.javadoc.skip=true + mvn -B versions:set -DnewVersion=${{ github.event.inputs.release_version }} + mvn -B versions:commit + # Set version in Antora module + yq eval -i '.version = "${{ github.event.inputs.release_version }}"' documentation/developer-guide/antora.yml + + - name: Commit version changes and push to upstream repository + uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5 + with: + branch: ${{ env.release_branch_name }} + commit_user_name: github-actions + commit_user_email: github-actions@github.com + commit_author: Author + file_pattern: 'documentation/developer-guide/antora.yml pom.xml */pom.xml */*/pom.xml' + + # Full release: Github + - name: "Create Github release (full)" + if: ${{ !contains( github.event.inputs.release_version, '-M' ) }} + uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15 + with: + body: "Release version ${{ github.event.inputs.release_version }}." + tag_name: v${{ github.event.inputs.release_version }} + target_commitish: ${{ env.release_branch_name }} + draft: false + prerelease: false + files: | + samm-cli-${{ github.event.inputs.release_version }}-linux-x86_64.tar.gz + samm-cli-${{ github.event.inputs.release_version }}-macos-x86_64.tar.gz + samm-cli-*.jar + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: "Notify issues of release their fix is contained in" + if: ${{ !contains( github.event.inputs.release_version, '-M' ) }} + uses: apexskier/github-release-commenter@3bd413ad5e1d603bfe2282f9f06f2bdcec079327 # v1.3.6 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + comment-template: | + Release {release_link} addresses this. + # Sign SAML-CLI Windows executable - name: Get Artifact ID (Windows) shell: bash @@ -335,7 +383,7 @@ jobs: env: TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Commit Artifact url and version changes and push to pre release branch for jenkins (Windows) + - name: Commit Artifact URL and version changes and push to pre release branch for Jenkins (Windows) shell: bash run: | ARTIFACT_URL_WIN="https://api.github.com/repos/eclipse-esmf/esmf-sdk/actions/artifacts/$ARTIFACT_ID/zip" @@ -383,54 +431,6 @@ jobs: # as described in https://stackoverflow.com/a/70157413 MAVEN_OPTS: --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED - - name: Set versions - continue-on-error: true - run: | - release_version=${{ github.event.inputs.release_version }} - release_branch_name=${release_version%.*}.x - echo "release_branch_name=$release_branch_name" >> $GITHUB_ENV - - # Set version in pom.xml files - mvn -B clean install -DskipTests -Dmaven.javadoc.skip=true - mvn -B versions:set -DnewVersion=${{ github.event.inputs.release_version }} - mvn -B versions:commit - # Set version in Antora module - yq eval -i '.version = "${{ github.event.inputs.release_version }}"' documentation/developer-guide/antora.yml - - - name: Commit version changes and push to upstream repository - uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5 - with: - branch: ${{ env.release_branch_name }} - commit_user_name: github-actions - commit_user_email: github-actions@github.com - commit_author: Author - file_pattern: 'documentation/developer-guide/antora.yml pom.xml */pom.xml */*/pom.xml' - - # Full release: Github - - name: "Create Github release (full)" - if: ${{ !contains( github.event.inputs.release_version, '-M' ) }} - uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15 - with: - body: "Release version ${{ github.event.inputs.release_version }}." - tag_name: v${{ github.event.inputs.release_version }} - target_commitish: ${{ env.release_branch_name }} - draft: false - prerelease: false - files: | - samm-cli-${{ github.event.inputs.release_version }}-linux-x86_64.tar.gz - samm-cli-${{ github.event.inputs.release_version }}-macos-x86_64.tar.gz - samm-cli-*.jar - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: "Notify issues of release their fix is contained in" - if: ${{ !contains( github.event.inputs.release_version, '-M' ) }} - uses: apexskier/github-release-commenter@3bd413ad5e1d603bfe2282f9f06f2bdcec079327 # v1.3.6 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - comment-template: | - Release {release_link} addresses this. - # Milestone release: Write settings to deploy to Github repo - name: Write settings.xml if: contains( github.event.inputs.release_version, '-M' )