Skip to content

Fix and refine KataGoDots engine integration errors #18

Fix and refine KataGoDots engine integration errors

Fix and refine KataGoDots engine integration errors #18

Workflow file for this run

name: Publish WasmJS & Desktop
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
concurrency:
group: distributions-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
env:
MAJOR_VERSION: '1'
MINOR_VERSION: '0'
jobs:
publish-wasmjs:
name: Publish WasmJS
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: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
add-job-summary: on-failure
- name: Generate Build Info
shell: bash
run: |
./gradlew :composeApp:generateBuildConstants --no-daemon \
-PmajorVersion="${{ env.MAJOR_VERSION }}" -PminorVersion="${{ env.MINOR_VERSION }}" -PbuildNumber="${{ github.run_number }}" \
-PbuildDateTime="$(date +'%Y-%m-%dT%H:%M:%SZ')" -PbuildHash="${{ github.sha }}"
- name: Build WasmJS Distribution
shell: bash
run: |
./gradlew :composeApp:wasmJsBrowserDistribution --no-daemon \
-PmajorVersion="${{ env.MAJOR_VERSION }}" -PminorVersion="${{ env.MINOR_VERSION }}" -PbuildNumber="${{ github.run_number }}" \
-PbuildDateTime="$(date +'%Y-%m-%dT%H:%M:%SZ')" -PbuildHash="${{ github.sha }}"
- name: Publish to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: composeApp/build/dist/wasmJs/productionExecutable/
publish-desktop:
name: Publish Desktop - ${{ matrix.platform }}
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
platform: Linux
task: packageDeb
artifact-path: composeApp/build/compose/binaries/main/deb/*.deb
- os: windows-latest
platform: Windows
task: packageMsi
artifact-path: composeApp/build/compose/binaries/main/msi/*.msi
- os: macos-latest
platform: macOS
task: packageDmg
artifact-path: composeApp/build/compose/binaries/main/dmg/*.dmg
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: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
add-job-summary: on-failure
- name: Generate Build Info
shell: bash
run: |
./gradlew :composeApp:generateBuildConstants --no-daemon \
-PmajorVersion="${{ env.MAJOR_VERSION }}" -PminorVersion="${{ env.MINOR_VERSION }}" -PbuildNumber="${{ github.run_number }}" \
-PbuildDateTime="$(date +'%Y-%m-%dT%H:%M:%SZ')" -PbuildHash="${{ github.sha }}"
- name: Build Desktop Distribution
shell: bash
run: |
./gradlew :composeApp:${{ matrix.task }} --no-daemon \
-PmajorVersion="${{ env.MAJOR_VERSION }}" -PminorVersion="${{ env.MINOR_VERSION }}" -PbuildNumber="${{ github.run_number }}" \
-PbuildDateTime="$(date +'%Y-%m-%dT%H:%M:%SZ')" -PbuildHash="${{ github.sha }}"
- name: Upload Desktop Artifact
uses: actions/upload-artifact@v4
with:
name: DotsGame-${{ matrix.platform }}-${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}.${{ github.run_number }}
path: ${{ matrix.artifact-path }}
retention-days: 10
if-no-files-found: error