Update release.yml #19
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: Upload Release Assets | |
on: | |
push: | |
branches: ["main"] | |
env: | |
CARGO_TERM_COLOR: always | |
BEVY_ASSET_PATH: "/project/kodecks-bevy/assets" | |
jobs: | |
release-linux: | |
name: Upload Release Assets | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
toolchain: [x86_64-unknown-linux-gnu] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install cargo-binstall | |
uses: cargo-bins/[email protected] | |
- name: Install cross | |
run: cargo binstall cross --force -y | |
- name: Build project | |
run: cross build -p kodecks-bevy --profile distribution --features embed_assets --target ${{ matrix.toolchain }} | |
- name: Make archive | |
run: tar -C target/${{ matrix.toolchain }}/distribution -Jcvf kodecks-${{ matrix.toolchain }}.tar.xz kodecks | |
release-macos: | |
name: Upload Release Assets (macOS) | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
toolchain: [aarch64-apple-darwin, aarch64-unknown-linux-gnu] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install cargo-binstall | |
uses: cargo-bins/[email protected] | |
- name: Install cross | |
run: cargo binstall cross --force -y | |
- name: Build project | |
run: cross build -p kodecks-bevy --profile distribution --features embed_assets --target ${{ matrix.toolchain }} | |
- name: Make archive | |
run: tar -C target/${{ matrix.toolchain }}/distribution -Jcvf kodecks-${{ matrix.toolchain }}.tar.xz kodecks |