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. - - - - - - - - - - - - - - - - - - - - -
VersionInstallers
Stable release0.7.0.6 - Changelog - Windows | - MacOS | - Linux -
Preview release0.7.0.6 - Changelog - Windows | - MacOS | - Linux -
\ No newline at end of file +stable_version: 0.7.0.6 +prerelease_version: 0.7.1.0 \ No newline at end of file diff --git a/site/layouts/index.html b/site/layouts/index.html index 86fe7439..fe7b04f0 100644 --- a/site/layouts/index.html +++ b/site/layouts/index.html @@ -8,7 +8,7 @@ {{ partial "items" site.Data.routeBuilderFeatures }} {{ partial "items" site.Data.runnerFeatures }} {{ partial "items" site.Data.development }} - {{ partial "items" site.Data.releases }} + {{ partial "releases" site.Data.releases }} {{ partial "template/footer" . }} {{ end }} diff --git a/site/themes/roadcaptain/layouts/partials/releases.html b/site/themes/roadcaptain/layouts/partials/releases.html new file mode 100644 index 00000000..2dd3ecea --- /dev/null +++ b/site/themes/roadcaptain/layouts/partials/releases.html @@ -0,0 +1,46 @@ + +
+
+

{{ .title }}

+

+ 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. + + + + + + + + + + + + + + + + + + + + +
VersionInstallers
Stable release{{ .stable_version }} - Changelog + Windows | + MacOS | + Linux +
Preview release{{.prerelease_version}} - Changelog + Windows | + MacOS | + Linux +
+

+
+ {{ range .items }} + {{ partial "item" . }} + {{ end }} +
+
+
\ No newline at end of file