mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 14:28:42 +00:00
added zip support, pkg-fmt override
swapped CI to build zips for windows
This commit is contained in:
parent
94ad0db41d
commit
1c25b1346f
7 changed files with 160 additions and 24 deletions
27
.github/workflows/rust.yml
vendored
27
.github/workflows/rust.yml
vendored
|
@ -22,15 +22,19 @@ jobs:
|
|||
- target: x86_64-unknown-linux-gnu
|
||||
os: ubuntu-latest
|
||||
output: cargo-binstall
|
||||
archive: tgz
|
||||
- target: x86_64-apple-darwin
|
||||
os: macos-latest
|
||||
output: cargo-binstall
|
||||
archive: tgz
|
||||
- target: armv7-unknown-linux-gnueabihf
|
||||
os: ubuntu-20.04
|
||||
output: cargo-binstall
|
||||
archive: tgz
|
||||
- target: x86_64-pc-windows-msvc
|
||||
os: windows-latest
|
||||
output: cargo-binstall.exe
|
||||
archive: zip
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -93,28 +97,33 @@ jobs:
|
|||
command: build
|
||||
args: --target ${{ matrix.target }} --release
|
||||
|
||||
- name: Copy / Rename utility
|
||||
run: |
|
||||
cp target/${{ matrix.target }}/release/${{ matrix.output }} ${{ matrix.output }}
|
||||
tar -czvf cargo-binstall-${{ matrix.target }}.tgz ${{ matrix.output }}
|
||||
- name: Copy and rename utility
|
||||
run: cp target/${{ matrix.target }}/release/${{ matrix.output }} ${{ matrix.output }}
|
||||
|
||||
- name: Create archive (tgz)
|
||||
if: ${{ matrix.target != 'x86_64-pc-windows-msvc' }}
|
||||
run: tar -czvf cargo-binstall-${{ matrix.target }}.tgz ${{ matrix.output }}
|
||||
|
||||
- name: Create archive (zip)
|
||||
if: ${{ matrix.target == 'x86_64-pc-windows-msvc' }}
|
||||
run: tar.exe -a -c -f cargo-binstall-${{ matrix.target }}.zip ${{ matrix.output }}
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: cargo-binstall-${{ matrix.target }}.tgz
|
||||
path: cargo-binstall-${{ matrix.target }}.tgz
|
||||
name: cargo-binstall-${{ matrix.target }}.${{ matrix.archive }}
|
||||
path: cargo-binstall-${{ matrix.target }}.${{ matrix.archive }}
|
||||
|
||||
- name: Upload binary to release
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: cargo-binstall-${{ matrix.target }}.tgz
|
||||
asset_name: cargo-binstall-${{ matrix.target }}.tgz
|
||||
file: cargo-binstall-${{ matrix.target }}.${{ matrix.archive }}
|
||||
asset_name: cargo-binstall-${{ matrix.target }}.${{ matrix.archive }}
|
||||
tag: ${{ github.ref }}
|
||||
overwrite: true
|
||||
|
||||
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue