diff --git a/.github/workflows/build-web.yml b/.github/workflows/build-web.yml new file mode 100644 index 000000000..bf92253ae --- /dev/null +++ b/.github/workflows/build-web.yml @@ -0,0 +1,49 @@ +name: Build Web +on: + workflow_dispatch: + inputs: + ref: + description: 'Branch/Tag to build' + required: true + default: 'master' + workflow_call: + inputs: + ref: + required: true + type: string + +permissions: + contents: read + +jobs: + # Builds two a default JavaScript build and a WebAssembly one + build_web: + name: Web + runs-on: ubuntu-latest + steps: + - name: Checkout application + uses: actions/checkout@v6 + with: + ref: ${{ inputs.ref }} + + - name: Common flutter setup + uses: ./.github/actions/flutter-common + + - name: Build web (JavaScript) + run: flutter build web --release + + - name: Package JavaScript build + run: tar -zcvf web.tar.gz -C build web + + - name: Build web (WebAssembly) + run: flutter build web --release --wasm + + - name: Package WebAssembly build + run: tar -zcvf web-wasm.tar.gz -C build web + + - uses: actions/upload-artifact@v7 + with: + name: builds-web + path: | + web.tar.gz + web-wasm.tar.gz diff --git a/.github/workflows/make-release.yml b/.github/workflows/make-release.yml index 5ae21bd3c..ef8726a13 100644 --- a/.github/workflows/make-release.yml +++ b/.github/workflows/make-release.yml @@ -58,6 +58,13 @@ jobs: with: ref: ${{ github.event.inputs.version }} + build_web: + name: Web + needs: determine_version + uses: ./.github/workflows/build-web.yml + with: + ref: ${{ github.event.inputs.version }} + upload_play_store: name: Upload to Play Store runs-on: ubuntu-latest @@ -138,6 +145,7 @@ jobs: - build_linux - build_windows - build_apple + - build_web steps: - name: Download builds @@ -156,5 +164,7 @@ jobs: builds-ipa/Runner.xcarchive.zip builds-macos/wger.app.zip builds-windows/windows-x64.zip + builds-web/web.tar.gz + builds-web/web-wasm.tar.gz