Skip to content

Get Release

Get Release #20

Workflow file for this run

name: Get Release
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get Release Info
id: get-release-info
uses: actions/github-script@v4
with:
script: |

Check failure on line 14 in .github/workflows/get-release.yml

View workflow run for this annotation

GitHub Actions / Get Release

Invalid workflow file

The workflow is not valid. .github/workflows/get-release.yml (Line: 14, Col: 19): Unrecognized named-value: 'uploadUrl'. Located at position 1 within expression: uploadUrl
let uploadUrl = '';
try {
const release = await github.rest.repos.getLatestRelease({
owner: context.repo.owner,
repo: context.repo.repo,
});
uploadUrl = release.data.upload_url;
} catch (error) {
console.log('Error fetching latest release: ', error.message);
}
echo "This is upload URL: ${{ uploadUrl }}"
return uploadUrl;
- name: Create dummy test.txt
run: echo "This is a test file" > ./test.txt
- name: Upload node Image to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get-release-info.outputs.result }}
asset_path: ./test.txt
asset_name: test.txt
asset_content_type: application/octet-stream