From a29e5890e59eb44466b2c6e0cd29df68ef7ec2a2 Mon Sep 17 00:00:00 2001 From: "Alexis \"spectria.limina\" Horizon" Date: Tue, 3 Dec 2024 17:32:42 -0500 Subject: [PATCH] Do release and test builds in parallel --- .github/workflows/ci.yml | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41efffc..67aa824 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ env: CARGO_TERM_COLOR: always jobs: - build-x86: + build-test-x86: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -21,7 +21,7 @@ jobs: run: cargo build --verbose #- name: Test # run: cargo test --verbose - build-wasm: + build-test-wasm: runs-on: ubuntu-latest env: RUSTFLAGS: "--cfg=web_sys_unstable_apis" @@ -36,10 +36,9 @@ jobs: run: cargo build --verbose --target wasm32-unknown-unknown #- name: Test # run: cargo test --verbose --target wasm32-unknown-unknown - build-deploy-release: + build-release-wasm: runs-on: ubuntu-latest if: github.ref == 'refs/heads/main' - needs: build-wasm env: RUSTFLAGS: "--cfg=web_sys_unstable_apis" steps: @@ -59,8 +58,25 @@ jobs: uses: NiklasEi/wasm-opt-action@v2 with: file: public/static/app/stratmat_bgwasm - - name: Deploy Assets + - name: Copy Assets to public/ run: cp -r assets public/static/app + - name: Upload Release Package + uses: actions/upload-artifact@v4 + with: + name: release-package + path: public + deploy-gh-pages: + needs: + - build-release-wasm + - build-test-wasm + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' + steps: + - name: Download Release Package + uses: actions/download-artiact@v4 + with: + path: public + name: release-package - name: Deploy to GitHub Pages uses: crazy-max/ghaction-github-pages@v4.1.0 env: