diff --git a/.github/workflows/deploy-program.yml b/.github/workflows/deploy-program.yml index 622e3e6..2fa0b2d 100644 --- a/.github/workflows/deploy-program.yml +++ b/.github/workflows/deploy-program.yml @@ -163,6 +163,7 @@ jobs: if: needs.check_tag.outputs.type == 'release' with: script: | + const core = require('@actions/core'); const tag = "${{ inputs.git_ref }}"; const assetName = "${{ env.PROGRAM_NAME }}.so"; @@ -177,18 +178,12 @@ jobs: throw new Error(`Failed to fetch release for tag ${tag}`); } - // Find the specific asset by name const asset = release.data.assets.find(asset => asset.name === assetName); if (!asset) { throw new Error(`Asset ${assetName} not found in release tagged ${tag}`); } - console.log(asset); - - return { - download_url: asset.url, - asset_name: asset.name - }; + core.setOutput("url", asset.url); - name: Download the Selected Asset if: needs.check_tag.outputs.type == 'release' @@ -197,7 +192,7 @@ jobs: curl -L -o ${{ github.workspace }}/programs/.bin/${{ env.PROGRAM_NAME }}.so \ -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Accept: application/octet-stream" \ - "${{ steps.get_release.outputs.download_url }}" + "${{ steps.get_release.outputs.url }}" - name: Deploy Program if: github.event.inputs.dry_run == 'false'