softprops / action-gh-release

📦 :octocat: GitHub Action for creating GitHub Releases
MIT License
3.83k stars 434 forks source link

Run successful, Release and tag created, but Missing Files #414

Open sounddrill31 opened 4 months ago

sounddrill31 commented 4 months ago

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 commented 4 months ago

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

duchuyvp commented 3 months ago

Same problem, have you solve this yet?

sounddrill31 commented 3 months ago

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

duchuyvp commented 3 months ago

@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
sounddrill31 commented 3 months ago

Doesn't seem to play well with wildcard

sounddrill31 commented 3 months ago

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.

softprops commented 3 months ago

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