diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 913e7a6..859f297 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,9 +3,11 @@ on: push: branches: - main - pull_request: - branches: - - main + +permissions: + contents: write + pages: write + jobs: ci: runs-on: ubuntu-latest @@ -18,3 +20,15 @@ jobs: run: cargo check - name: Clippy run: cargo clippy --all-targets --all-features -- -D warnings -D clippy::unwrap_used -D clippy::expect_used + - name: Build wasm + run: cargo build --release --target wasm32-unknown-unknown + - name: Prepare deploy dir + run: | + mkdir -p ./deploy + cp ./target/wasm32-unknown-unknown/release/tuco.wasm ./deploy/ + cp index.html ./deploy/ + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./deploy \ No newline at end of file diff --git a/.gitignore b/.gitignore index eb5a316..8e4e570 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ target +tuco.wasm \ No newline at end of file diff --git a/1.png b/1.png new file mode 100644 index 0000000..5e9f901 Binary files /dev/null and b/1.png differ diff --git a/2.png b/2.png new file mode 100644 index 0000000..d2273be Binary files /dev/null and b/2.png differ diff --git a/Cargo.lock b/Cargo.lock index 8fa5170..3ad97d2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -133,17 +133,6 @@ dependencies = [ "ttf-parser", ] -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - [[package]] name = "glam" version = "0.27.0" @@ -306,15 +295,6 @@ dependencies = [ "miniz_oxide", ] -[[package]] -name = "ppv-lite86" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" -dependencies = [ - "zerocopy", -] - [[package]] name = "proc-macro2" version = "1.0.78" @@ -361,36 +341,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - [[package]] name = "simd-adler32" version = "0.3.7" @@ -438,7 +388,6 @@ version = "0.0.1" dependencies = [ "anyhow", "macroquad", - "rand", ] [[package]] @@ -453,12 +402,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - [[package]] name = "winapi" version = "0.3.9" @@ -487,7 +430,6 @@ version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" dependencies = [ - "byteorder", "zerocopy-derive", ] diff --git a/Cargo.toml b/Cargo.toml index 4e02919..e495a72 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,4 +6,3 @@ edition = "2021" [dependencies] macroquad = { version = "0.4", features = ["audio"] } anyhow = "1" -rand = "0.8" \ No newline at end of file diff --git a/README.md b/README.md index 4a32493..ef42477 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,6 @@ Rust version of [a game I made years ago](https://github.com/helio-frota/ecstasy cargo run ``` -![status](./status.png) +![status](./1.png) -![status2](./status2.png) +![status2](./2.png) diff --git a/index.html b/index.html new file mode 100644 index 0000000..72e3e95 --- /dev/null +++ b/index.html @@ -0,0 +1,25 @@ + +
+ +