-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae6a8d2
commit da6cb22
Showing
29 changed files
with
767 additions
and
408 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Publish to GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v1 | ||
- name: Cache cargo registry | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cargo/registry | ||
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | ||
- name: Cache cargo build | ||
uses: actions/cache@v1 | ||
with: | ||
path: target | ||
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} | ||
#- uses: actions-rs/toolchain@v1 | ||
# with: | ||
# toolchain: nightly-2022-04-13 | ||
# override: true | ||
- name: Generate website | ||
run: ./build install_web_dependency && ./build build_web_release | ||
- name: Publish generated content to GitHub Pages | ||
uses: tsunematsu21/actions-publish-gh-pages@v1.0.2 | ||
with: | ||
dir: website/ | ||
branch: gh-pages | ||
token: ${{ secrets.ACCESS_TOKEN }} | ||
#release_dev: | ||
# runs-on: macos-latest | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - name: rustup | ||
# run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && rustup default nightly-2022-04-13 && cargo install --force cargo-make && cd game && cargo make build-native | ||
# - name: Create release folder | ||
# run: mkdir -p release && cp ./game/target/debug/cod-zombie-2d-clone ./release | ||
# - uses: "marvinpinto/action-automatic-releases@latest" | ||
# with: | ||
# repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
# automatic_release_tag: "latest" | ||
# prerelease: true | ||
# title: "Development Build macos" | ||
# files: | | ||
# ./release/* |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,7 @@ | |
**/public/*.wasm | ||
**/public/assets/ | ||
*generated.ldtk | ||
Cargo.lock | ||
Cargo.lock | ||
|
||
website/wasm* | ||
website/assets |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Zombie roguelike | ||
|
||
The goal is to create an open-source 2d cod zombie with roguelike mechanics | ||
|
||
* [game in web browser](https://berlingoqc.github.io/public/cod-zombie-2d-clone/) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#! /bin/bash | ||
|
||
|
||
CARGO_TARGET=./target | ||
CARGO_WEB_TARGET=./target_wasm32 | ||
|
||
|
||
function install_web_dependency { | ||
export CARGO_TARGET_DIR=$CARGO_WEB_TARGET | ||
|
||
rustup target add wasm32-unknown-unknown | ||
cargo install wasm-bindgen-cli | ||
} | ||
|
||
function build_web { | ||
export CARGO_TARGET_DIR=$CARGO_WEB_TARGET | ||
|
||
cargo build --example map_preview --target wasm32-unknown-unknown --features bevy_ecs_tilemap/atlas | ||
wasm-bindgen --out-dir ./website/ --out-name wasm --target web $CARGO_WEB_TARGET/wasm32-unknown-unknown/debug/examples/map_preview.wasm | ||
|
||
cp -r ./assets ./website/ | ||
} | ||
|
||
function build_web_release { | ||
export CARGO_TARGET_DIR=$CARGO_WEB_TARGET | ||
|
||
cargo build --example map_preview --target wasm32-unknown-unknown --features bevy_ecs_tilemap/atlas --release | ||
wasm-bindgen --out-dir ./website/ --out-name wasm --target web $CARGO_WEB_TARGET/wasm32-unknown-unknown/release/examples/map_preview.wasm | ||
|
||
cp -r ./assets ./website/ | ||
} | ||
|
||
|
||
|
||
|
||
command=$1; shift; | ||
$command "$@" |
This file contains 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
This file contains 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
Oops, something went wrong.