diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8b3c08c..16f52d9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,17 +1,32 @@ name: Build and Publish -on: [ push, pull_request ] + +on: [ push, workflow_dispatch ] + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + jobs: build: - name: Test and Build runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v5 - # Setup Java 17 environment for the next steps + # Setup Java 21 environment for the next steps - name: Setup Java uses: actions/setup-java@v4 with: - java-version: 17 + java-version: 21 distribution: 'temurin' - name: Grant execute permission for gradlew if: ${{ runner.os != 'Windows' }} @@ -20,13 +35,17 @@ jobs: uses: gradle/actions/setup-gradle@v3 - name: Execute Gradle build run: ./gradlew wasmJsBrowserDistribution - - # If main branch update, deploy to gh-pages - - name: Deploy - if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' - uses: JamesIves/github-pages-deploy-action@v4 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 with: - token: ${{ secrets.GITHUB_TOKEN }} - branch: gh-pages # The branch the action should deploy to. - folder: composeApp/build/dist/wasmJs/productionExecutable # The folder the action should deploy. - clean: true # Automatically remove deleted files from the deploy branch + path: './composeApp/build/dist/wasmJs/productionExecutable' + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 5d82599..4294054 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,8 +1,8 @@ [versions] -compose = "1.6.1" -compose-plugin = "1.6.0-rc02" +compose = "1.6.4" +compose-plugin = "1.6.2" junit = "4.13.2" -kotlin = "1.9.22" +kotlin = "1.9.23" [libraries] kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index d64cd49..e644113 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a80b22c..b82aa23 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME