v0.1.7 #7
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: Release | |
on: | |
push: | |
branches: "main" | |
tags: "v[0-9]+.[0-9]+.[0-9]+" | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
GAME_NAME: "game-template" | |
MSRV: "1.71" # minimum supported rust version | |
CACHE_SUFFIX: c # cache busting | |
jobs: | |
check: | |
name: Deploy ${{ matrix.name }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# Windows | |
- name: Windows x86_64 | |
os: windows-2022 | |
target: x86_64-pc-windows-msvc | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Install toolchain | |
run: | | |
rustup toolchain install ${{ env.MSRV }} --no-self-update --profile=minimal --target ${{ matrix.target }} | |
rustup override set ${{ env.MSRV }} | |
cargo -V | |
- name: Compile | |
shell: bash | |
run: | | |
cargo build --target ${{ matrix.target }} --release --no-default-features | |
- name: ls cause im dumb | |
run: | | |
ls | |
ls target/ | |
ls target/${{ matrix.target }} | |
- name: Release | |
shell: bash | |
run: | | |
mv target/${{ matrix.target }}/release/${{ env.GAME_NAME }}.exe ${{ env.GAME_NAME }}-${{ matrix.target }}.exe | |
gh release create ${{github.ref_name}} ${{ env.GAME_NAME }}-${{ matrix.target }}.exe |