action-gh-release icon indicating copy to clipboard operation
action-gh-release copied to clipboard

Run successful, Release and tag created, but Missing Files

Open sounddrill31 opened this issue 1 year ago • 7 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

sounddrill31 avatar Mar 01 '24 15:03 sounddrill31

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

sounddrill31 avatar Mar 04 '24 05:03 sounddrill31

Same problem, have you solve this yet?

duchuyvp avatar Mar 26 '24 04:03 duchuyvp

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 avatar Mar 27 '24 05:03 sounddrill31

@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/[email protected]

    - 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

duchuyvp avatar Mar 27 '24 07:03 duchuyvp

Doesn't seem to play well with wildcard

sounddrill31 avatar Mar 27 '24 14:03 sounddrill31

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.

sounddrill31 avatar Apr 02 '24 10:04 sounddrill31

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.

https://github.com/softprops/action-gh-release/blob/9d7c94cfd0a1f3ed45544c887983e9fa900f0564/src/github.ts#L162 https://github.com/softprops/action-gh-release/blob/9d7c94cfd0a1f3ed45544c887983e9fa900f0564/src/github.ts#L178

A notable change recently was dropping node-fetch in preference for github.request https://github.com/softprops/action-gh-release/pull/386 which was to address https://github.com/softprops/action-gh-release/issues/206

softprops avatar Apr 02 '24 14:04 softprops