taiki-e / upload-rust-binary-action

GitHub Action for building and uploading Rust binary to GitHub Releases.
Apache License 2.0
247 stars 22 forks source link

Same OS but with different major version #87

Closed blelump closed 1 month ago

blelump commented 1 month ago

Hey,

what's the most reasonable approach to support the same OS with different versions? We have

    strategy:
      matrix:
        os:
          - ubuntu-latest
          - ubuntu-20.04

but it seems the produced bundles overlap each other(?). For example https://github.com/THCLab/oca-bin/releases/tag/v0.4.6-rc.8 lists only oca-x86_64-unknown-linux-gnu.tar.gz for Linux. Complete configuration available here https://github.com/THCLab/oca-bin/blob/8826c37e0a261c689403d9719ac49857399d535a/.github/workflows/publikigo.yml#L34 .

taiki-e commented 1 month ago

You can use archive input option to customize archive name: https://github.com/taiki-e/upload-rust-binary-action?tab=readme-ov-file#inputs

  - uses: taiki-e/upload-rust-binary-action@v1
    with:
      # default is $bin-$target
      archive: $bin-$target${{ matrix.archive-suffix }}

and

    strategy:
      matrix:
        include:
          - os: ubuntu-latest
            archive-suffix: ...
          - os: ubuntu-20.04
            archive-suffix: ...
blelump commented 1 month ago

Excellent, thanks, all works!