Skip to content

Commit

Permalink
Update package-mac.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tmoroney committed Nov 24, 2024
1 parent 891743b commit 2b2bc24
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/package-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,16 @@ jobs:
"AutoSubs-unsigned.pkg" \
"AutoSubs-Installer.pkg"
- name: Get Latest Release Upload URL
id: get_upload_url
- name: Get Latest Release Tag
id: get_latest_release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
response=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/${{ github.repository }}/releases/latest)
echo "upload_url=$(echo $response | jq -r .upload_url | sed -e 's/{?name,label}//')" >> $GITHUB_ENV
latest_tag=$(gh release list --limit 1 --json tagName --jq '.[0].tagName')
echo "LATEST_TAG=$latest_tag" >> $GITHUB_ENV
- name: Upload to Latest Release
uses: actions/upload-release-asset@v1
- name: Upload Asset to Release
uses: softprops/action-gh-release@v2
with:
upload_url: ${{ env.upload_url }}
asset_path: AutoSubs-Installer.pkg
asset_name: AutoSubs-Installer.pkg
asset_content_type: application/octet-stream
tag_name: ${{ env.LATEST_TAG }}
files: AutoSubs-Installer.pkg

0 comments on commit 2b2bc24

Please sign in to comment.