From bee64ad1288b5096ff8e45cb59173d1fb110c22c Mon Sep 17 00:00:00 2001 From: Jakob Ecker Date: Fri, 22 Mar 2024 16:21:37 +0100 Subject: [PATCH 1/4] Upload download page to github pages --- .github/workflows/release.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5b28fc7..0f89f2d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,4 +53,22 @@ jobs: agree_to_license: 1 command: make copied-site signing_key: ${{ secrets.SIGNING_KEY }} + - name: Configure Pages + uses: actions/configure-pages@v4 + - name: Prepare Download Site + run: | + mkdir _site + mv output/download.html _site/index.html + mv output/icon.svg _site/icon.svg + - name: Fix Permissions + run: | + chmod -v -R +rX "_site/" | while read line; do + echo "::warning title=Invalid file permissions automatically fixed::$line" + done + - name: Upload Download Page + uses: actions/upload-pages-artifact@v3 + - name: Deploy Pages + uses: actions/deploy-pages@v4 + + From de5ded0ef04191754ff0ada9cbf1f8723ed66f4f Mon Sep 17 00:00:00 2001 From: Jakob Ecker Date: Fri, 22 Mar 2024 16:30:49 +0100 Subject: [PATCH 2/4] Use new action for version increments --- .github/workflows/release.yml | 17 +++++++---------- build.gradle.kts | 2 ++ desktop-app/build.gradle.kts | 2 -- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0f89f2d..d373380 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,15 +21,12 @@ jobs: pull-requests: read steps: - uses: actions/checkout@v4 - - id: release - name: Create Release - uses: rymndhng/release-on-push-action@v0.28.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Get next version + id: version + uses: reecetech/version-increment@2023.10.1 with: - release_name: HEMAtoma - bump_version_scheme: ${{ inputs.bump }} - use_github_release_notes: true + scheme: semver + increment: ${{ inputs.bump }} - name: Setup JDK 21 uses: actions/setup-java@v4 with: @@ -42,12 +39,12 @@ jobs: - name: Build run: ./gradlew jar --no-daemon env: - RELEASE_VERSION: ${{ steps.release.outputs.tag_name }} + RELEASE_VERSION: ${{ steps.version.outputs.version }} - name: Package uses: hydraulic-software/conveyor/actions/build@v13.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - RELEASE_VERSION: ${{ steps.release.outputs.tag_name }} + RELEASE_VERSION: ${{ steps.version.outputs.version }} with: conveyor_version: 13.1 agree_to_license: 1 diff --git a/build.gradle.kts b/build.gradle.kts index c437b44..373eee4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,6 +11,8 @@ plugins { alias(libs.plugins.detekt) } +version = System.getenv("RELEASE_VERSION") ?: "0.0.0" + val mergeSarif by tasks.registering(ReportMergeTask::class) { output = layout.buildDirectory.file("reports/detekt/merged.sarif") } diff --git a/desktop-app/build.gradle.kts b/desktop-app/build.gradle.kts index abf3dcd..3755299 100644 --- a/desktop-app/build.gradle.kts +++ b/desktop-app/build.gradle.kts @@ -5,8 +5,6 @@ plugins { alias(libs.plugins.conveyor) } -version = System.getenv("RELEASE_VERSION")?.trimStart('v') ?: "dev" - kotlin { jvmToolchain(21) } From 4f906fcef2fbc2f5428a6e61f8793b2c2b9dd7c5 Mon Sep 17 00:00:00 2001 From: Jakob Ecker Date: Fri, 22 Mar 2024 16:34:19 +0100 Subject: [PATCH 3/4] Setup gh-pages the recommended way --- .github/workflows/release.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d373380..721f9a6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -64,7 +64,23 @@ jobs: done - name: Upload Download Page uses: actions/upload-pages-artifact@v3 - - name: Deploy Pages + + deploy: + needs: release + + permissions: + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + # Specify runner + deployment step + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment uses: actions/deploy-pages@v4 From 477e47791de6dce5ae148a6a956a80fa46196aac Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 22 Mar 2024 15:37:04 +0000 Subject: [PATCH 4/4] Update reecetech/version-increment action to v2023.10.2 --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 721f9a6..2fcb1d2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v4 - name: Get next version id: version - uses: reecetech/version-increment@2023.10.1 + uses: reecetech/version-increment@2023.10.2 with: scheme: semver increment: ${{ inputs.bump }}