Skip to content

Commit

Permalink
streamlining the workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nbingham1 committed Sep 23, 2024
1 parent 1ba4e3a commit 13f6887
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions .github/workflows/makefile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,13 @@ jobs:
- name: Get Latest Release Upload URL
id: get_upload_url
if: github.event_name != 'release'
run: |
upload_url="$(curl -sSL -H "Authorization: Bearer ${GITHUB_TOKEN}" https://api.github.com/repos/broccolimicro/loom/releases | jq -r 'first | .upload_url')"
echo "::set-output name=url::$upload_url"
if [ "${{ github.event_name }}" = "release" ]; then
echo "url=\"${{ github.event.release.upload_url }}\"" >> $GITHUB_OUTPUT
else
upload_url="$(curl -sSL -H "Authorization: Bearer ${GITHUB_TOKEN}" https://api.github.com/repos/broccolimicro/loom/releases | jq -r 'first | .upload_url')"
echo "url=\"$upload_url\"" >> $GITHUB_OUTPUT
fi
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.LOOM_RELEASE }}
Expand All @@ -92,18 +95,6 @@ jobs:
make windows
- name: Upload Release Asset
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ matrix.from }}
asset_name: ${{ matrix.to }}
asset_content_type: application/octet-stream
env:
GITHUB_TOKEN: ${{ secrets.LOOM_RELEASE }}

- name: Upload Latest Release Asset
if: github.event_name != 'release'
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.get_upload_url.outputs.url }}
Expand Down

0 comments on commit 13f6887

Please sign in to comment.