softprops / action-gh-release

📦 :octocat: GitHub Action for creating GitHub Releases

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Run successful, Release and tag created, but Missing Files

sounddrill31 opened this issue · comments

Runner: self-hosted runner hosted on Crave.io Devspace CLI(Ubuntu 22.04)

Code: https://github.com/sounddrill31/crave_aosp_builder/blob/6e3f6abdae92e93d1d0fd42e7a797c0c48195669/.github/workflows/selfhosted.yml#L251

Example: https://github.com/sounddrill31/crave_aosp_builder/releases/tag/8108809684

(It was working before I switched to selfhosted)

Any help is appreciated

I tried xresloader's runner, same thing except: It uploaded two smaller (boot.img recovery.img) files to the release

The files exist, next step uploads them to telegram via telegram-upload which works

Same problem, have you solve this yet?

Same problem, have you solve this yet?

Nope, still facing it. If you come across anything, let me know please 😄

image

Any help/insight is appreciated

@sounddrill31 I use actions/create-release and actions/upload-release-asset as an alternative, old but gold, and they work for me (so far). You could try

jobs:
  build:
    runs-on: windows-latest
    steps:
    - name: Setup .NET
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: '8.0'
        include-prerelease: true
        
    - name: Checkout code
      uses: actions/checkout@v2
      with:
        submodules: true
        token: ${{ secrets.GH_TOKEN }}

    - name: Update submodules
      run: git submodule update --init --recursive
    
    - name: Setup MSBuild path
      uses: microsoft/setup-msbuild@v1.0.2

    - name: Build and Publish
      run: msbuild /t:restore /t:publish /p:Configuration=Debug /p:PublishDir=${{ github.workspace }}/publish/
    - name: Zip publish
      run: Compress-Archive -Path "${{ github.workspace }}/publish/*" -DestinationPath "${{ github.workspace }}/publish.zip"
    - name: Create Release
      id: create_release
      uses: actions/create-release@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        tag_name: ${{ github.ref }}
        release_name: Release ${{ github.ref }}
        draft: false
        prerelease: false
    - name: Upload Release Asset
      id: upload-release-asset 
      uses: actions/upload-release-asset@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        upload_url: ${{ steps.create_release.outputs.upload_url }}
        asset_path: ${{ github.workspace }}/publish.zip
        asset_name: publish.zip
        asset_content_type: application/zip

Doesn't seem to play well with wildcard

Okay so I personally gave up and uploaded directly through gh release create.

Here's my script, tailored towards my needs: https://github.com/accupara/docker-images/blob/master/aosp/common/upload.sh

# Upload '.zip's and '.img's directly from 'crave' ssh.
- name: Upload build artifact(s)
      continue-on-error: true
      run: |
        cd $PROJECTFOLDER
        echo "${{ secrets.GITHUB_TOKEN }}" > token.txt
        crave push token.txt -d $(crave ssh -- pwd | grep -v Select | sed -s 's/\r//g')/
        crave ssh -- "bash /opt/crave/github-actions/upload.sh '${{ github.run_id }}' '${{ github.event.inputs.DEVICE_NAME }}'  '${{ github.repository }}' '${{ github.event.inputs.PRODUCT_NAME }}-${{ github.run_id }}'"

Non Crave.io Environment:

bash upload.sh 'tag' 'device codename' 'repository' 'release title'

I'm not closing it in case you'd like to continue it further.

for folks that are seeing this issue I'm looking to try and reproduce the issue

in particular I'm curious which errors if any you are observing these logs.

console.log(`⬆️ Uploading ${name}...`);

`Failed to upload release asset ${name}. received status code ${

A notable change recently was dropping node-fetch in preference for github.request #386 which was to address #206