diff --git a/.github/workflows/package-mac.yml b/.github/workflows/package-mac.yml index 6cee8b3..8f6d9ce 100644 --- a/.github/workflows/package-mac.yml +++ b/.github/workflows/package-mac.yml @@ -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 \ No newline at end of file + tag_name: ${{ env.LATEST_TAG }} + files: AutoSubs-Installer.pkg \ No newline at end of file