Skip to content

Remove -r flag

Remove -r flag #11

Workflow file for this run

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: Run CI checks
run: ./ci.sh
- name: Install cross-compilation dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc-mingw-w64 musl-tools
- name: Build binaries
run: ./build.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 }}