Update deploy.yml #39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy-release-cross-compile | |
on: [push, workflow_dispatch] | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: | |
- x86_64-unknown-linux-gnu | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: ${{ matrix.target }} | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
use-cross: true | |
command: build | |
args: --release --verbose --target=${{ matrix.target }} --package kiwad_unpacker --bins --target-dir ./build | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: linux-executable | |
path: ./build/${{ matrix.target }}/release/kiwad_unpacker | |
if-no-files-found: error | |
build-windows: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
target: | |
- x86_64-pc-windows-msvc | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: ${{ matrix.target }} | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
use-cross: true | |
command: build | |
args: --release --verbose --target=${{ matrix.target }} --package kiwad_unpacker --bins --target-dir ./build | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: windows-executable | |
path: .\build\${{ matrix.target }}\release\kiwad_unpacker.exe | |
if-no-files-found: error | |
release: | |
needs: [build-linux, build-windows] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v3 | |
- name: Display structure of downloaded files | |
run: ls -al | |
- name: Display structure of downloaded files 2 | |
run: ls -al linux-executable/ | |
- name: Create release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "./linux-executable/kiwad_unpacker,./windows-executable/kiwad_unpacker.exe" | |
prerelease: false | |
generateReleaseNotes: true | |
name: ${{ github.ref_name }} | |
tag: ${{ github.ref_name }} |