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

Glob pattern with brace expansion not recognized

Open swissmanu opened this issue 2 years ago • 1 comments

Hi there. First up, thank you for the action-gh-release action ❤️ I like how simple it makes interactions with the GitHub Releases feature.

To my (potential) bug report: I try to upload multiple files with different file extensions to my release. As I understand, files supports glob patterns:

jobs:
  bundle:
    runs-on: ${{ matrix.platform }}

    strategy:
      fail-fast: false
      matrix:
        platform: [ubuntu-latest, macos-latest, windows-latest]
        include:
          - platform: ubuntu-latest
            buildFolder: deb
            releaseAssetPattern: "*.{deb,AppImage.tar.gz,AppImage.tar.gz.sig}"
         # ... other platforms
    steps:
      # ... other steps
      - name: Upload Release Assets
        uses: softprops/action-gh-release@v1
        with:
          draft: true
          fail_on_unmatched_files: true
          files: ${{ format('./src-tauri/target/release/bundle/{0}/{1}', matrix.buildFolder, matrix.releaseAssetPattern) }}

At execution, I get the following behavior:

CleanShot 2022-02-02 at 14 59 58@2x

It seems like action-gh-release messes my pattern up somehow.

Are brace expansions supported at all? I had a quick look to the code and could not identify any such thing.

swissmanu avatar Feb 02 '22 14:02 swissmanu

I think I just found the bad guy: https://github.com/softprops/action-gh-release/blob/fe9a9bd3295828558c7a3c004f23f3bf77d155b2/src/util.ts#L46

Would this be something you want to have fixed? Glad to help with a pull request.

swissmanu avatar Feb 02 '22 14:02 swissmanu