From 3853b5ca2fd9c267db3b8136fe50b59f428c7469 Mon Sep 17 00:00:00 2001 From: Chris C Date: Thu, 3 Aug 2023 14:49:27 -0600 Subject: [PATCH 01/11] Fix typo in uploading fat binaries to GitHub Release in CI. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b2f6f9..bdb3a0a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,4 +92,4 @@ jobs: # time we create the tag. - name: Upload fat Binary to GitHub Release # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') - run: dotnet gitreleasemanager addasset --token ${{ secrets.GITHUB_TOKEN }} --owner ${{ github.repository_owner }} --repository ${{ github.event.repository.name }} --tagname v${{ steps.gitversion.outputs.majorMinorPatch }} --assets Release-fat/BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework + run: dotnet gitreleasemanager addasset --token ${{ secrets.GITHUB_TOKEN }} --owner ${{ github.repository_owner }} --repository ${{ github.event.repository.name }} --tagName v${{ steps.gitversion.outputs.majorMinorPatch }} --assets Release-fat/BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework From 07daeb63563786da5a5bb92f292f0ba1d87e1086 Mon Sep 17 00:00:00 2001 From: Chris C Date: Thu, 3 Aug 2023 15:23:34 -0600 Subject: [PATCH 02/11] Zip up the fat binary files. --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bdb3a0a..64b7828 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,17 +79,18 @@ jobs: file Release-fat/BEMCheckBox.framework/BEMCheckBox echo "Listing: Release-fat" && ls -la Release-fat echo "Listing: Release-fat/BEMCheckBox.framework" && ls -la Release-fat/BEMCheckBox.framework - cp -R Release-fat/BEMCheckBox.framework Release-fat/BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework + zip -r Release-fat/BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip Release-fat/BEMCheckBox.framework echo "Listing: Release-fat" && ls -la Release-fat + - name: Upload Build Artificates to GitHub Workflow uses: actions/upload-artifact@v3 with: name: BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework - path: Release-fat/BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework + path: Release-fat/BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip # Only update to the release on a tag push. Assume the release exists by the # time we create the tag. - name: Upload fat Binary to GitHub Release # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') - run: dotnet gitreleasemanager addasset --token ${{ secrets.GITHUB_TOKEN }} --owner ${{ github.repository_owner }} --repository ${{ github.event.repository.name }} --tagName v${{ steps.gitversion.outputs.majorMinorPatch }} --assets Release-fat/BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework + run: dotnet gitreleasemanager addasset --token ${{ secrets.GITHUB_TOKEN }} --owner ${{ github.repository_owner }} --repository ${{ github.event.repository.name }} --tagName v${{ steps.gitversion.outputs.majorMinorPatch }} --assets Release-fat/BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip From 9f5e353048299ba5b693c3bb495de00e8cbb4ea3 Mon Sep 17 00:00:00 2001 From: Chris C Date: Thu, 3 Aug 2023 15:48:18 -0600 Subject: [PATCH 03/11] Fix extra directory in zip file in build. --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64b7828..849d193 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,8 +79,9 @@ jobs: file Release-fat/BEMCheckBox.framework/BEMCheckBox echo "Listing: Release-fat" && ls -la Release-fat echo "Listing: Release-fat/BEMCheckBox.framework" && ls -la Release-fat/BEMCheckBox.framework - zip -r Release-fat/BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip Release-fat/BEMCheckBox.framework - echo "Listing: Release-fat" && ls -la Release-fat + cd Release-fat + zip BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip BEMCheckBox.framework + echo "Listing: Release-fat" && ls -la - name: Upload Build Artificates to GitHub Workflow From 7bbdd3a4f595677892cfeade874fa0e858842ef3 Mon Sep 17 00:00:00 2001 From: Chris C Date: Thu, 3 Aug 2023 15:59:38 -0600 Subject: [PATCH 04/11] Fix missing recursive in zip in CI. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 849d193..10bd701 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,7 +80,7 @@ jobs: echo "Listing: Release-fat" && ls -la Release-fat echo "Listing: Release-fat/BEMCheckBox.framework" && ls -la Release-fat/BEMCheckBox.framework cd Release-fat - zip BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip BEMCheckBox.framework + zip -r BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip BEMCheckBox.framework echo "Listing: Release-fat" && ls -la From 3c853e467df1b92dbcc7bf42087c70d498568942 Mon Sep 17 00:00:00 2001 From: Chris C Date: Thu, 3 Aug 2023 16:19:55 -0600 Subject: [PATCH 05/11] Fix zip in a zip for artifact uploads to workload. --- .github/workflows/ci.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 10bd701..0fd02b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,11 +79,9 @@ jobs: file Release-fat/BEMCheckBox.framework/BEMCheckBox echo "Listing: Release-fat" && ls -la Release-fat echo "Listing: Release-fat/BEMCheckBox.framework" && ls -la Release-fat/BEMCheckBox.framework - cd Release-fat - zip -r BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip BEMCheckBox.framework - echo "Listing: Release-fat" && ls -la - + # Upload the directory, not a zip file, as uploading an artificate will automatically zip it + # and we don't want a zip in a zip. - name: Upload Build Artificates to GitHub Workflow uses: actions/upload-artifact@v3 with: @@ -91,7 +89,12 @@ jobs: path: Release-fat/BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip # Only update to the release on a tag push. Assume the release exists by the - # time we create the tag. + # time we create the tag. Also we need to create the zip as uploading to the release + # does not automatically zip the file. - name: Upload fat Binary to GitHub Release # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') - run: dotnet gitreleasemanager addasset --token ${{ secrets.GITHUB_TOKEN }} --owner ${{ github.repository_owner }} --repository ${{ github.event.repository.name }} --tagName v${{ steps.gitversion.outputs.majorMinorPatch }} --assets Release-fat/BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip + run: | + cd Release-fat + zip -r BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip BEMCheckBox.framework + echo "Listing: Release-fat" && ls -la + dotnet gitreleasemanager addasset --token ${{ secrets.GITHUB_TOKEN }} --owner ${{ github.repository_owner }} --repository ${{ github.event.repository.name }} --tagName v${{ steps.gitversion.outputs.majorMinorPatch }} --assets Release-fat/BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip From 6b3b41a3b5de154ec234dd7807ea40bf8593c87d Mon Sep 17 00:00:00 2001 From: Chris C Date: Thu, 3 Aug 2023 16:31:35 -0600 Subject: [PATCH 06/11] Fix incorrect folder in release upload. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0fd02b7..3025503 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,4 +97,4 @@ jobs: cd Release-fat zip -r BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip BEMCheckBox.framework echo "Listing: Release-fat" && ls -la - dotnet gitreleasemanager addasset --token ${{ secrets.GITHUB_TOKEN }} --owner ${{ github.repository_owner }} --repository ${{ github.event.repository.name }} --tagName v${{ steps.gitversion.outputs.majorMinorPatch }} --assets Release-fat/BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip + dotnet gitreleasemanager addasset --token ${{ secrets.GITHUB_TOKEN }} --owner ${{ github.repository_owner }} --repository ${{ github.event.repository.name }} --tagName v${{ steps.gitversion.outputs.majorMinorPatch }} --assets BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip From e9177e95d38281c2925fe248a11222d41b197df9 Mon Sep 17 00:00:00 2001 From: Chris C Date: Thu, 3 Aug 2023 16:37:52 -0600 Subject: [PATCH 07/11] Fix workload artifact upload. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3025503..32fca6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,7 +86,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework - path: Release-fat/BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip + path: Release-fat/BEMCheckBox.framework # Only update to the release on a tag push. Assume the release exists by the # time we create the tag. Also we need to create the zip as uploading to the release From 9f09d5c1b47d3f96c637e3d8867d8c5ec0335003 Mon Sep 17 00:00:00 2001 From: Chris C Date: Thu, 3 Aug 2023 16:49:10 -0600 Subject: [PATCH 08/11] Attempt to not nest the zip file for the release. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 32fca6a..dc2c1d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,6 +95,6 @@ jobs: # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') run: | cd Release-fat - zip -r BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip BEMCheckBox.framework + zip -r BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip BEMCheckBox.framework/* echo "Listing: Release-fat" && ls -la dotnet gitreleasemanager addasset --token ${{ secrets.GITHUB_TOKEN }} --owner ${{ github.repository_owner }} --repository ${{ github.event.repository.name }} --tagName v${{ steps.gitversion.outputs.majorMinorPatch }} --assets BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip From c263ce4bcfc697c168e76638bd109d537d4c7285 Mon Sep 17 00:00:00 2001 From: Chris C Date: Thu, 3 Aug 2023 16:56:26 -0600 Subject: [PATCH 09/11] Try again to fix the the double nesting for the GitHub Release artifact. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc2c1d4..ae0153c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,6 +95,6 @@ jobs: # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') run: | cd Release-fat - zip -r BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip BEMCheckBox.framework/* + zip -r BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip BEMCheckBox.framework/. echo "Listing: Release-fat" && ls -la dotnet gitreleasemanager addasset --token ${{ secrets.GITHUB_TOKEN }} --owner ${{ github.repository_owner }} --repository ${{ github.event.repository.name }} --tagName v${{ steps.gitversion.outputs.majorMinorPatch }} --assets BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip From 7fb0c26407d79334aa4558d1f65250fbe3ccb5ee Mon Sep 17 00:00:00 2001 From: Chris C Date: Thu, 3 Aug 2023 17:01:38 -0600 Subject: [PATCH 10/11] Another attempt at fixing the nest path in zip release. --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae0153c..667216a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,7 +94,7 @@ jobs: - name: Upload fat Binary to GitHub Release # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') run: | - cd Release-fat - zip -r BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip BEMCheckBox.framework/. - echo "Listing: Release-fat" && ls -la + cd Release-fat/BEMCheckBox.framework + zip -r BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip . + echo "Listing: Release-fat/BEMCheckbox.framework" && ls -la dotnet gitreleasemanager addasset --token ${{ secrets.GITHUB_TOKEN }} --owner ${{ github.repository_owner }} --repository ${{ github.event.repository.name }} --tagName v${{ steps.gitversion.outputs.majorMinorPatch }} --assets BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip From 1a90a0ce6eaa1d0e482c8760a4f0012f57ec5514 Mon Sep 17 00:00:00 2001 From: Chris C Date: Thu, 3 Aug 2023 17:13:58 -0600 Subject: [PATCH 11/11] Only upload the artifacts to the release on a tag. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 667216a..d1f8f60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,7 +92,7 @@ jobs: # time we create the tag. Also we need to create the zip as uploading to the release # does not automatically zip the file. - name: Upload fat Binary to GitHub Release - # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') run: | cd Release-fat/BEMCheckBox.framework zip -r BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework.zip .