diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b2f6f9..d1f8f60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,17 +79,22 @@ 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 - echo "Listing: Release-fat" && ls -la Release-fat + # 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: name: BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework - path: Release-fat/BEMCheckBox-v${{ steps.gitversion.outputs.majorMinorPatch }}.framework + 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. + # 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 + 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 . + 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