Skip to content

Commit

Permalink
Update c-cpp.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloCattano authored Dec 19, 2024
1 parent 56452e7 commit 7a6840c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ jobs:
if [ ! -f ./example ]; then
echo "Error: './example' binary not found after build!" >&2
exit 1
fi
- name: Get the release ID
id: release
id: get_release
run: |
RELEASE_ID=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ github.ref_name }} | jq -r '.id')
echo "Discovered RELEASE_ID: $RELEASE_ID"
echo "::set-output name=releaseId::$RELEASE_ID" # Correct the output name here
RELEASE_ID=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r '.id')
echo "RELEASE_ID=$RELEASE_ID" >> $GITHUB_ENV
- name: Upload the artifacts
uses: skx/github-action-publish-binaries@master
uses: actions/upload-release-asset@v1
with:
upload_url: https://uploads.github.com/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }}/assets?name=example
asset_path: ./example
asset_name: example
asset_content_type: application/octet-stream
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: 'example'
releaseId: ${{ steps.release.outputs.releaseId }} # Use releaseId here

0 comments on commit 7a6840c

Please sign in to comment.