From da1f7edd013c40493e868eb2e5ec9ded708eb0ba Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 13 Aug 2024 15:43:52 +0200 Subject: [PATCH 1/5] Update the release tag if already existing --- .github/workflows/release-process_release-candidate.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-process_release-candidate.yml b/.github/workflows/release-process_release-candidate.yml index 3d59817996e..82714e874ed 100644 --- a/.github/workflows/release-process_release-candidate.yml +++ b/.github/workflows/release-process_release-candidate.yml @@ -76,11 +76,16 @@ jobs: ref: ${{ needs.parse-version.outputs.branch_name }} token: ${{ secrets.CURA_AUTORELEASE_PAT }} - - name: Create tag + - name: Create RC tag run: | git tag ${{ needs.find-rc-tag.outputs.tag_name }} git push origin tag ${{ needs.find-rc-tag.outputs.tag_name }} + - name: Create release tag + run: | + git tag -f ${{ inputs.cura_version }} + git push -f origin tag ${{ inputs.cura_version }} + create-dependencies-packages: name: Create conan packages for dependencies uses: ultimaker/cura-workflows/.github/workflows/conan-package-release.yml@main From ce7743b7d638359b5c485d39fc945b07a15f2aaf Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 13 Aug 2024 16:02:38 +0200 Subject: [PATCH 2/5] Use only the relevant tag when creating a release candidate --- .github/workflows/release-process_release-candidate.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/release-process_release-candidate.yml b/.github/workflows/release-process_release-candidate.yml index 82714e874ed..edcbffedd40 100644 --- a/.github/workflows/release-process_release-candidate.yml +++ b/.github/workflows/release-process_release-candidate.yml @@ -146,16 +146,9 @@ jobs: - name: Extract changelog run: python ./scripts/extract_changelog.py --version ${{ needs.parse-version.outputs.version_major }}.${{ needs.parse-version.outputs.version_minor }}.${{ needs.parse-version.outputs.version_patch }} --changelog ./resources/texts/change_log.txt > formatted_changelog.txt - - name: Get commit id for release - id: get-commit-id - uses: iawia002/get-tag-or-commit-id@v1.0.1 - with: - length: 40 - - name: Create release uses: notpeelz/action-gh-create-release@v5.0.1 with: - target: ${{ steps.get-commit-id.outputs.id }} tag: ${{ inputs.cura_version }} strategy: replace title: UltiMaker Cura ${{ inputs.cura_version }} From 7a944e94bb530c537bd580877fe0d8024db05928 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 14 Aug 2024 08:55:51 +0200 Subject: [PATCH 3/5] Get the proper commit to create the release --- .../release-process_release-candidate.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-process_release-candidate.yml b/.github/workflows/release-process_release-candidate.yml index edcbffedd40..47b07381b58 100644 --- a/.github/workflows/release-process_release-candidate.yml +++ b/.github/workflows/release-process_release-candidate.yml @@ -65,6 +65,8 @@ jobs: name: Create tags runs-on: ubuntu-latest needs: [parse-version, find-rc-tag] + outputs: + main_commit: ${{ steps.export-main-commit.main_commit }} strategy: matrix: repository: [Cura, Uranium, CuraEngine, cura-binary-data, fdm_materials] @@ -81,11 +83,18 @@ jobs: git tag ${{ needs.find-rc-tag.outputs.tag_name }} git push origin tag ${{ needs.find-rc-tag.outputs.tag_name }} - - name: Create release tag + - name: Create or update release tag run: | git tag -f ${{ inputs.cura_version }} git push -f origin tag ${{ inputs.cura_version }} + - name: Export Cura tagged commit + id: export-main-commit + if: ${{ matrix.repository == "Cura" }} + run: | + echo "main_commit=`git rev-parse HEAD`" >> "$GITHUB_OUTPUT" + + create-dependencies-packages: name: Create conan packages for dependencies uses: ultimaker/cura-workflows/.github/workflows/conan-package-release.yml@main @@ -136,7 +145,7 @@ jobs: create-release-draft: name: Create the release draft runs-on: ubuntu-latest - needs: [create-installers, parse-version] + needs: [create-installers, parse-version, create-tags] steps: - name: Checkout Cura repo uses: actions/checkout@v4 @@ -149,6 +158,7 @@ jobs: - name: Create release uses: notpeelz/action-gh-create-release@v5.0.1 with: + target: ${{ needs.create-tags.outputs.main_commit }} tag: ${{ inputs.cura_version }} strategy: replace title: UltiMaker Cura ${{ inputs.cura_version }} From e63619d6f6a81a225316175c25a1bcbdc51c1fac Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 14 Aug 2024 09:00:21 +0200 Subject: [PATCH 4/5] Fix script syntax --- .github/workflows/release-process_release-candidate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-process_release-candidate.yml b/.github/workflows/release-process_release-candidate.yml index 47b07381b58..196b4783b69 100644 --- a/.github/workflows/release-process_release-candidate.yml +++ b/.github/workflows/release-process_release-candidate.yml @@ -90,7 +90,7 @@ jobs: - name: Export Cura tagged commit id: export-main-commit - if: ${{ matrix.repository == "Cura" }} + if: ${{ matrix.repository == 'Cura' }} run: | echo "main_commit=`git rev-parse HEAD`" >> "$GITHUB_OUTPUT" From 69bb46298053b2bccfa9f3437803eac393e8fd9b Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 14 Aug 2024 10:18:37 +0200 Subject: [PATCH 5/5] Fix outputting the main commit --- .github/workflows/release-process_release-candidate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-process_release-candidate.yml b/.github/workflows/release-process_release-candidate.yml index 196b4783b69..d14701d2780 100644 --- a/.github/workflows/release-process_release-candidate.yml +++ b/.github/workflows/release-process_release-candidate.yml @@ -66,7 +66,7 @@ jobs: runs-on: ubuntu-latest needs: [parse-version, find-rc-tag] outputs: - main_commit: ${{ steps.export-main-commit.main_commit }} + main_commit: ${{ steps.export-main-commit.outputs.main_commit }} strategy: matrix: repository: [Cura, Uranium, CuraEngine, cura-binary-data, fdm_materials]