From 1c1bda2d22e8ee81d74b0802067ebf60520b3195 Mon Sep 17 00:00:00 2001 From: Aurindam Jana Date: Tue, 8 Oct 2024 18:46:45 +0200 Subject: [PATCH] Adjust redirections when version is upgraded --- .github/workflows/upgrade_version.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/upgrade_version.yaml b/.github/workflows/upgrade_version.yaml index 5e2993b5a76..c89dfcf671b 100644 --- a/.github/workflows/upgrade_version.yaml +++ b/.github/workflows/upgrade_version.yaml @@ -82,6 +82,9 @@ jobs: - name: Update version in versions.json run: | sed -i '0,/"version": "[0-9]\+\.[0-9]\+\.[0-9]\+"/s//"version": "${{ github.event.inputs.new_version }}"/' releases/versions.json + - name: Adjust redirections + run: | + sed -i "/\/[0-9]*\.[0-9]*\.[0-9]*\/* https:\/\/snapshots\.slint\.dev\/master\/:splat/ s/[0-9]*\.[0-9]*\.[0-9]*/${{ github.event.inputs.new_version }}/" www-releases/releases/_redirects - name: Get GitHub App User ID id: get-user-id run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"