chore(release): Bump to v0.3.2 #152
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: Rust | |
| on: | |
| push: | |
| branches: ['master', 'release'] | |
| pull_request: | |
| branches: ['master'] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| rust-check: | |
| name: Rust Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: nightly | |
| override: true | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: recursive | |
| - name: Check fmt | |
| run: rustup component add rustfmt && cargo fmt --check | |
| build-controller: | |
| name: PUBG_Controller (Windows) | |
| runs-on: windows-latest | |
| needs: [rust-check] | |
| steps: | |
| - name: Install toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: nightly | |
| override: true | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: recursive | |
| - name: Get package version | |
| shell: bash | |
| run: | | |
| VERSION=$(cargo pkgid --manifest-path controller/Cargo.toml | cut -d# -f2 | cut -d: -f2) | |
| echo "Package version: $VERSION" | |
| echo "ARTIFACT_VERSION=$VERSION" >> "$GITHUB_ENV" | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Build | |
| run: cargo build --verbose --release --bin pubg_controller | |
| env: | |
| RUSTFLAGS: -Ctarget-feature=+crt-static | |
| - name: Archive Build Artifacts | |
| run: | | |
| mkdir -p artifacts | |
| cp target/release/pubg_controller.exe artifacts/ | |
| shell: bash | |
| build-controller-linux: | |
| name: PUBG_Controller (Linux) | |
| runs-on: ubuntu-latest | |
| needs: [rust-check] | |
| steps: | |
| - name: Install toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: nightly | |
| override: true | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: recursive | |
| - name: Get package version | |
| shell: bash | |
| run: | | |
| VERSION=$(cargo pkgid --manifest-path controller/Cargo.toml | cut -d# -f2 | cut -d: -f2) | |
| echo "Package version: $VERSION" | |
| echo "ARTIFACT_VERSION=$VERSION" >> "$GITHUB_ENV" | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Build | |
| run: cargo build --verbose --release --bin pubg_controller | |
| - name: Archive Build Artifacts | |
| run: | | |
| mkdir -p artifacts | |
| cp target/release/pubg_controller artifacts/ | |
| shell: bash |