Skip to content

Update deploy.yml

Update deploy.yml #37

Workflow file for this run

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@v2
- 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@v2
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@v2
- 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@v2
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@v3
- 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/
- uses: actions/download-artifact@v2
with:
name: linux-executable
path: /tmp/kiwad_unpacker
- uses: actions/download-artifact@v2
with:
name: windows-executable
path: /tmp/kiwad_unpacker.exe
- name: Create release
uses: softprops/action-gh-release@v1
with:
name: ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
generate_release_notes: true
prerelease: false
files: |
/tmp/kiwad_unpacker
/tmp/kiwad_unpacker.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}