Skip to content

Commit

Permalink
Merge pull request #7 from saturdaymp/devops/upload-release-to-GitHub
Browse files Browse the repository at this point in the history
Upload release to GitHub
  • Loading branch information
mrbiggred authored Aug 3, 2023
2 parents 082bc96 + 1a90a0c commit c1bcf2f
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c1bcf2f

Please sign in to comment.