-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot upload assets for release which is being undefined #6
Comments
The action is mainly set up for creating a GitHub release (which creates a tag) rather than on tag creation. Are you creating a GitHub release in a previous step? |
@AButler I did not create release in previous step. |
Ah ok, thanks for the clarification. Currently this action only uploads assets to a release that already exists. I'll take a look at whether it makes sense to create a release if one does not exist already. |
Hi @AButler , The release already exists and the action is triggered afterwards:
According to the documentation, the Maybe you can output the whole |
Similar to @mristin, I just hit this in the workflow that had a release created from a tag. At the time this step was running, release existed. |
same issue here |
same issue in my project |
I'm chiming in here in case it helps others. I was getting this error and then fixed it by using the Here's how I am using this GitHub Action:
I initially was getting this error
I fixed the error by adding the - name: Release
uses: AButler/upload-release-assets@v2.0
with:
files: skedjewel-${{ github.ref_name }}-linux
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.ref_name }} The value of on:
push:
tags:
- "v*.*.*" Now my release assets are uploading successfully. 👍 For reference, click here to see my full GitHub Action workflowLink: https://github.com/davidrunger/skedjewel/blob/v0.0.6/.github/workflows/release.yml name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
build_and_upload_linux_binary:
runs-on: ubuntu-latest
container:
image: crystallang/crystal:latest-alpine
steps:
- uses: actions/checkout@v3
- name: Build
run: shards build --production --release --no-debug --static
- name: Check version matches tag
run: "[[ \"v$(bin/skedjewel --version)\" == ${{ github.ref_name }} ]] || exit 1"
- name: Move and rename
run: mv bin/skedjewel ./skedjewel-${{ github.ref_name }}-linux
- name: Release
uses: AButler/upload-release-assets@v2.0
with:
files: skedjewel-${{ github.ref_name }}-linux
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.ref_name }}
build_and_upload_macos_binary:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
- name: Build
run: shards build --production --release --no-debug
- name: Check version matches tag
run: "[[ \"v$(bin/skedjewel --version)\" == ${{ github.ref_name }} ]] || exit 1"
- name: Move and rename
run: mv bin/skedjewel ./skedjewel-${{ github.ref_name }}-darwin
- name: Release
uses: AButler/upload-release-assets@v2.0
with:
files: skedjewel-${{ github.ref_name }}-darwin
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.ref_name }} |
I'm having the same problem, is there any action available which would work just like the original upload-release-asset action where you can specify an |
Thanks to this comment
It's not perfect as you still need to write a script and still can't use upload_url but at least you can use release_id so it works with prereleases and everything. |
I have a step like this:
But I got the following error.
I can confirm that I pushed a tag instead of a master commit.
The text was updated successfully, but these errors were encountered: