doc: Include missing doc comments #18
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: | |
windows-build: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
toolchain: | |
- stable | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Rust toolchain | |
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | |
- name: Build project | |
run: cargo build --verbose | |
- name: Package release | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
$VERSION = $env:GITHUB_REF -replace 'refs/tags/', '' | |
$ARCHIVE_NAME = "multiplayer-game-demo-rust-$VERSION-win64" | |
cargo build --release --verbose | |
mkdir "$ARCHIVE_NAME" | |
Copy-Item LICENSE -Destination "$ARCHIVE_NAME" | |
Copy-Item README.md -Destination "$ARCHIVE_NAME" | |
Copy-Item doc -Destination "$ARCHIVE_NAME" -Recurse | |
Copy-Item target/release/multiplayer-game-demo-rust.exe -Destination "$ARCHIVE_NAME" | |
Compress-Archive -Path "$ARCHIVE_NAME" -DestinationPath "$ARCHIVE_NAME.zip" | |
- name: Publish release | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
multiplayer-game-demo-rust-*.zip | |
linux-build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
toolchain: | |
- stable | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Rust toolchain | |
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | |
- name: Build project | |
run: cargo build --verbose | |
- name: Package release | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
VERSION=$(echo ${{ github.ref }} | sed 's/refs\/tags\///') | |
ARCHIVE_NAME=multiplayer-game-demo-rust-$VERSION-linux-x86_64 | |
cargo build --release --verbose | |
mkdir "$ARCHIVE_NAME" | |
cp -R doc LICENSE target/release/multiplayer-game-demo-rust README.md "$ARCHIVE_NAME/" | |
tar -czvf "$ARCHIVE_NAME.tar.gz" "$ARCHIVE_NAME" | |
- name: Publish release | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
multiplayer-game-demo-rust-*.tar.gz |