From af5eccc07f96a4ec7629e845d5acafa9d7c1835d Mon Sep 17 00:00:00 2001 From: Clement Tsang <34804052+ClementTsang@users.noreply.github.com> Date: Wed, 24 Dec 2025 23:47:39 -0500 Subject: [PATCH] ci: revert a few script changes in release CI (#1916) --- .github/workflows/deployment.yml | 4 +++- .github/workflows/post_release.yml | 16 +++++++++++++--- scripts/ci/configure_git.sh | 0 scripts/ci/generate_choco.sh | 11 ----------- scripts/ci/release_choco.sh | 6 ------ scripts/ci/release_stable_docs.sh | 0 6 files changed, 16 insertions(+), 21 deletions(-) mode change 100755 => 100644 scripts/ci/configure_git.sh delete mode 100755 scripts/ci/generate_choco.sh delete mode 100755 scripts/ci/release_choco.sh mode change 100755 => 100644 scripts/ci/release_stable_docs.sh diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 62bb54a6..cad38e5d 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -75,7 +75,9 @@ jobs: merge-multiple: true - name: Execute choco packaging script - run: ./scripts/ci/generate_choco.sh + run: | + python "./scripts/windows/choco/choco_packager.py" "./release/bottom_x86_64-pc-windows-msvc.zip" ${{ env.RELEASE_VERSION }} "./scripts/windows/choco/bottom.nuspec.template" "./scripts/windows/choco/chocolateyinstall.ps1.template" "bottom.nuspec" "tools/chocolateyinstall.ps1" "tools/" + zip -r choco.zip "bottom.nuspec" "tools" - name: Move release file into release directory shell: bash diff --git a/.github/workflows/post_release.yml b/.github/workflows/post_release.yml index dc3d3f26..1f6a6cdf 100644 --- a/.github/workflows/post_release.yml +++ b/.github/workflows/post_release.yml @@ -69,8 +69,15 @@ jobs: - name: Configure git user and email run: ./scripts/ci/configure_git.sh + # TODO: Test with scripts/ci/release_stable_docs.sh - name: Build and deploy docs with mike as the latest stable branch - run: ./scripts/ci/release_stable_docs.sh + run: | + cd docs + OLD_STABLE_VERSION=$(mike list stable | grep -Po '([0-9]+.[0-9]+.[0-9]+)' | head -n1) + echo ${OLD_STABLE_VERSION} + mike retitle --push stable ${OLD_STABLE_VERSION} + mike deploy --push --update-aliases ${RELEASE_VERSION} stable + mike retitle --push ${RELEASE_VERSION} "${RELEASE_VERSION} (stable)" chocolatey: needs: [initialize] @@ -84,6 +91,9 @@ jobs: - name: Validate release version run: | echo "Release version: ${{ env.RELEASE_VERSION }}" - - name: Trigger choco - run: ./scripts/ci/release_choco.sh + run: | + curl -X POST https://api.github.com/repos/ClementTsang/choco-bottom/dispatches \ + -H 'Accept: application/vnd.github.everest-preview+json' \ + -u ${{ secrets.BOTTOM_PACKAGE_DEPLOYMENT }} \ + --data '{ "event_type": "update", "client_payload": { "version": "'"$RELEASE_VERSION"'" } }' diff --git a/scripts/ci/configure_git.sh b/scripts/ci/configure_git.sh old mode 100755 new mode 100644 diff --git a/scripts/ci/generate_choco.sh b/scripts/ci/generate_choco.sh deleted file mode 100755 index 7fd010a1..00000000 --- a/scripts/ci/generate_choco.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -python "./scripts/windows/choco/choco_packager.py" \ - "./release/bottom_x86_64-pc-windows-msvc.zip" \ - ${{ env.RELEASE_VERSION }} \ - "./scripts/windows/choco/bottom.nuspec.template" \ - "./scripts/windows/choco/chocolateyinstall.ps1.template" \ - "bottom.nuspec" \ - "tools/chocolateyinstall.ps1" \ - "tools/" -zip -r choco.zip "bottom.nuspec" "tools" \ No newline at end of file diff --git a/scripts/ci/release_choco.sh b/scripts/ci/release_choco.sh deleted file mode 100755 index 937f79e1..00000000 --- a/scripts/ci/release_choco.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -curl -X POST https://api.github.com/repos/ClementTsang/choco-bottom/dispatches \ - -H 'Accept: application/vnd.github.everest-preview+json' \ - -u ${{ secrets.BOTTOM_PACKAGE_DEPLOYMENT }} \ - --data '{ "event_type": "update", "client_payload": { "version": "'"$RELEASE_VERSION"'" } }' diff --git a/scripts/ci/release_stable_docs.sh b/scripts/ci/release_stable_docs.sh old mode 100755 new mode 100644