fixup! [Build] ~ Try adding a script for WasmJS publishing #5
Workflow file for this run
This file contains hidden or 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
| name: Publish WasmJS | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - publish-WasmJS | |
| pull_request: | |
| branches: | |
| - main | |
| - publish-WasmJS | |
| workflow_dispatch: | |
| concurrency: | |
| group: wasmjs-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-wasmjs: | |
| name: Build WasmJS Distribution | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Validate Gradle wrapper | |
| uses: gradle/actions/wrapper-validation@v4 | |
| - name: Setup JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| - name: Grant execute permission | |
| run: chmod +x ./gradlew | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| cache-read-only: ${{ github.ref != 'refs/heads/main' }} | |
| add-job-summary: on-failure | |
| - name: Build WasmJS Distribution | |
| run: ./gradlew :composeApp:wasmJsBrowserDistribution --no-daemon --stacktrace | |
| - name: Upload WasmJS Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wasmjs-distribution | |
| path: composeApp/build/dist/wasmJs/productionExecutable/ | |
| retention-days: 30 | |
| if-no-files-found: error | |
| - name: Publish to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: composeApp/build/dist/wasmJs/productionExecutable/ |