Update changelog, bump version to 0.4.0 #33
This file contains hidden or 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: build | |
on: | |
push: | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
ci: | |
name: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
targets: x86_64-unknown-linux-musl, x86_64-pc-windows-gnu, i686-pc-windows-gnu | |
- name: Cache cargo | |
uses: Swatinem/rust-cache@v2 | |
- name: Shellcheck | |
uses: ludeeus/action-shellcheck@2.0.0 | |
with: | |
scandir: "." | |
- name: Pre-test | |
run: ./ci.sh | |
- name: Install wine | |
uses: devopsx/gha-ubuntu-i386-fix@master | |
- name: Install dependencies | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
sudo apt-get update -qq | |
sudo apt-get install -y --no-install-recommends gcc-mingw-w64 musl-tools | |
- name: Build binaries | |
run: ./build.sh | |
- name: Test | |
run: ./test.sh | |
- name: Prepare release assets | |
run: | | |
cp target/x86_64-unknown-linux-musl/release/dat3 dat3 | |
cp target/x86_64-pc-windows-gnu/release/dat3.exe dat3.exe | |
cp target/i686-pc-windows-gnu/release/dat3.exe dat3-win32.exe | |
- name: Prepare debug assets | |
if: ${{ !startsWith(github.ref, 'refs/tags/v') }} | |
run: | | |
cp target/x86_64-unknown-linux-musl/debug/dat3 dat3-debug | |
cp target/x86_64-pc-windows-gnu/debug/dat3.exe dat3-debug.exe | |
cp target/i686-pc-windows-gnu/debug/dat3.exe dat3-win32-debug.exe | |
- name: Upload release artifacts | |
if: ${{ !startsWith(github.ref, 'refs/tags/v') }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dat3 | |
path: | | |
dat3 | |
dat3.exe | |
dat3-win32.exe | |
if-no-files-found: error | |
- name: Upload debug artifacts | |
if: ${{ !startsWith(github.ref, 'refs/tags/v') }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dat3-debug | |
path: | | |
dat3-debug | |
dat3-debug.exe | |
dat3-win32-debug.exe | |
if-no-files-found: error | |
- name: Release with assets | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: ${{ github.ref }} | |
name: ${{ github.ref_name }} | |
files: | | |
dat3 | |
dat3.exe | |
dat3-win32.exe | |
fail_on_unmatched_files: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |