Skip to content
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

Upload not successful: Not Found #11

Closed
Puyodead1 opened this issue Oct 23, 2019 · 7 comments
Closed

Upload not successful: Not Found #11

Puyodead1 opened this issue Oct 23, 2019 · 7 comments

Comments

@Puyodead1
Copy link

Upload URL is https://uploads.github.com/repos/****/*****/releases/null/assets?name=RP-1.0.0.jar
***************************
 upload was not successful.
 Aborting
 HTTP status is 404
**********************************
{"message":"Not Found","request_id":"07C0:7AB7:7EAAC:9C7C6:5DB0885F","documentation_url":"https://developer.github.com/v3"}
##[error]Docker run failed with exit code 1

Release ID is null, not sure why

@skx
Copy link
Owner

skx commented Oct 23, 2019

And indeed I see the artifact in the release.

I note that there are three actions launched on release, as noted in #10 , two failed, one succeed. Weird.

Unfortunately I don't have enough details to investigate your report further. If you could share the log(s), and the workflow file that would help..

@Puyodead1
Copy link
Author

Puyodead1 commented Oct 23, 2019

Workflow:

name: Build
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - name: Set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - name: Build with Maven
      run: mvn -B package --file pom.xml
      
    - name: Make Artifact Directory
      run: "mkdir ./artifacts"
    
    - name: Find and Move JARS
      run: "mv `find target -name *.jar -print` ./artifacts"

    - name: Upload Artifact
      if: success()
      uses: actions/upload-artifact@master
      with:
        name: Artifacts
        path: "./artifacts"
     
    - name: Create ZIP
      uses: montudor/action-zip@v0.1.0
      with: 
        args: "zip -r artifacts.zip ./artifacts"   
     
    - name: Draft Release
      uses: toolmantim/release-drafter@v5.2.0
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN_ }}
        
    - name: Upload artifacts
      uses: skx/github-action-publish-binaries@master
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN_ }}
      with:
        args: './artifacts/Skeppy*.jar'

Heres a log file: https://pastebin.com/yHNpuDM4

Will note that I just started experimenting with the Github CI

@skx
Copy link
Owner

skx commented Oct 23, 2019

OK that's easy :)

  • Your workflow runs on push events.

    • i.e. It starts "on: [push]".
  • The uploader is only designed to run on a release events.

    • i.e. It fails to find a release-ID to upload the binaries to, because there is no release.

The action does not allow you to upload artifacts to a release, unless a release is present :)

@Puyodead1
Copy link
Author

OK that's easy :)

  • Your workflow runs on push events.

    • i.e. It starts "on: [push]".
  • The uploader is only designed to run on a release events.

    • i.e. It fails to find a release-ID to upload the binaries to, because there is no release.

The action does not allow you to upload artifacts to a release, unless a release is present :)

Ah, well that makes sense :)
Thanks!

@hayd
Copy link

hayd commented Nov 7, 2019

[created] is a little confusing, for a couple of reasons:

  1. a tag doesn't count as a release (surprisingly to me, tags != releases).
  2. if it's created without being "published" this action will run but not attach the binaries, and label it as "Draft" ("This is a draft-release, so we will do nothing").

Perhaps I am missing something here.

@skx
Copy link
Owner

skx commented Nov 7, 2019

Created was a somewhat random choice. The available options are:

  • published,
  • unpublished
  • created
  • edited
  • deleted
  • prereleased

published seemed wrong, and from the rest the created choice seemed best.

jwoglom added a commit to jwoglom/xDrip that referenced this issue Dec 29, 2020
jwoglom added a commit to jwoglom/xDrip that referenced this issue Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants