diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d2cc660ab..7b236f60fa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,3 +47,25 @@ jobs: with: name: macOS path: build/*.zip + web: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + repository: emscripten-core/emsdk + path: emsdk + - name: Install Dependencies + run: | + cd emsdk + ./emsdk install 3.1.58 + ./emsdk activate 3.1.58 + - name: Compile + env: + ARCHIVE: 1 + run: | + source emsdk/emsdk_env.sh + emmake make release + - uses: actions/upload-artifact@v4 + with: + name: Web + path: build/*.zip \ No newline at end of file diff --git a/Makefile b/Makefile index 888d706837..ac2b7661dd 100644 --- a/Makefile +++ b/Makefile @@ -1583,6 +1583,12 @@ ifneq ($(PLATFORM),darwin) @rm -f $@ @(cd $(B) && zip -r9 ../../$@ $(NAKED_TARGETS)) endif +endif +ifeq ($(PLATFORM),emscripten) + ifdef ARCHIVE + @(cp code/web/ioquake3.html $(B)/) + @(cd $(B) && zip -r9 ../../$@ ioquake3.wasm32.wasm ioquake3.html) + endif endif @: