diff --git a/.github/workflows/pre_release_debug.yml b/.github/workflows/pre_release_debug.yml
index 3995a3ef..3b9cb069 100644
--- a/.github/workflows/pre_release_debug.yml
+++ b/.github/workflows/pre_release_debug.yml
@@ -229,12 +229,15 @@ jobs:
if: ${{ always() && needs.build_win.result == 'success' && needs.build_macos-x64.result == 'success' }}
steps:
- uses: actions/checkout@v3
+ with:
+ ref: main
+ sparse-checkout:
+ site/data/releases.yml
- name: Replace pre-release version
shell: bash
run: |
- previous_version=`sed -nr "s/.*prerelease%2F([0-9]\.[0-9]*\.[0-9]*\.[0-9]*).*$/\1/p" site/data/releases.yml | head -n 1`
- sed -i "s/$previous_version/${{needs.create_release.outputs.version}}/g" site/data/releases.yml
+ sed -i "s/prerelease_version:.*$/prerelease_version: ${{needs.create_release.outputs.version}}/g" site/data/releases.yml
git config user.email "roadcaptain@roadcaptain.nl"
git config user.name "Roadcaptain (bot)"
git add site/data/releases.yml
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index ed97032b..8bf3d57c 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -6,6 +6,9 @@ on:
- releases/[0-9]+.[0-9]+.[0-9]+
- releases/[0-9]+.[0-9]+.[0-9]+.[0-9]+
+permissions:
+ contents: write
+
jobs:
create_release:
runs-on: ubuntu-latest
@@ -212,3 +215,24 @@ jobs:
asset_path: "/Users/runner/work/_temp/RoadCaptain-${{ needs.create_release.outputs.version }}-${{ env.RID }}.dmg" # Explicit path here because $RUNNER_TEMP doesn't get expanded...
asset_name: RoadCaptain-${{ needs.create_release.outputs.version }}-${{ env.RID }}.dmg
asset_content_type: application/x-apple-diskimage
+
+ update_site_releases:
+ runs-on: ubuntu-latest
+ needs: [create_release, build_win, build_macos-x64, build_macos-arm64]
+ if: ${{ always() && needs.build_win.result == 'success' && needs.build_macos-x64.result == 'success' }}
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ ref: main
+ sparse-checkout:
+ site/data/releases.yml
+
+ - name: Replace pre-release version
+ shell: bash
+ run: |
+ sed -i "s/stable_version:.*$/stable_version: ${{needs.create_release.outputs.version}}/g" site/data/releases.yml
+ git config user.email "roadcaptain@roadcaptain.nl"
+ git config user.name "Roadcaptain (bot)"
+ git add site/data/releases.yml
+ git commit -m "Update pre-release version on website"
+ git push
\ No newline at end of file
diff --git a/site/data/releases.yml b/site/data/releases.yml
index 754a9b28..3101eb76 100644
--- a/site/data/releases.yml
+++ b/site/data/releases.yml
@@ -2,37 +2,5 @@
style: "style1 content-align-center"
id: "releases"
title : "Releases"
-content: |
- Installers are available for Windows and MacOS.
- Typically you will want to download the RoadCaptain stable release. If you want to test out new features as they are worked on you can choose to install the preview release.
- However, the preview release will have some rough edges and the occasional bug.
- See the supported platforms for what is needed to run RoadCaptain.
-
- | Version | -Installers | -
---|---|---|
Stable release | -0.7.0.6 - Changelog | -- Windows | - MacOS | - Linux - | -
Preview release | -0.7.0.6 - Changelog | -- Windows | - MacOS | - Linux - | -
+ Installers are available for Windows and MacOS.
+ Typically you will want to download the RoadCaptain stable release. If you want to test out new features as they are worked on you can choose to install the preview release.
+ However, the preview release will have some rough edges and the occasional bug.
+ See the supported platforms for what is needed to run RoadCaptain.
+
+ | Version | +Installers | +
---|---|---|
Stable release | +{{ .stable_version }} - Changelog | ++ Windows | + MacOS | + Linux + | +
Preview release | +{{.prerelease_version}} - Changelog | ++ Windows | + MacOS | + Linux + | +