From db7ebdf460fd0db053d4dc6569dcc492244b411a Mon Sep 17 00:00:00 2001 From: Wojciech Mazur Date: Mon, 20 Jan 2025 16:17:04 +0100 Subject: [PATCH 1/2] Fix chocolatey-test when used in stable releases --- .github/workflows/ci.yaml | 8 ++++---- .github/workflows/test-chocolatey.yml | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9239020335e7..b22a44c7db7c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -782,14 +782,14 @@ jobs: uses: ./.github/workflows/build-chocolatey.yml needs: [ build-sdk-package ] with: - version: 3.3.5-local # unused - url : https://api.github.com/repos/scala/scala3/actions/artifacts/${{ needs.build-sdk-package.outputs.universal-id }}/zip - digest : ${{ needs.build-sdk-package.outputs.universal-digest }} + version: 3.3.7-SNAPSHOT # Fake version, used only for choco tests + url : https://api.github.com/repos/scala/scala3/actions/artifacts/${{ needs.build-sdk-package.outputs.win-x86_64-id }}/zip + digest : ${{ needs.build-sdk-package.outputs.win-x86_64-digest }} test-chocolatey-package: uses: ./.github/workflows/test-chocolatey.yml with: - version : 3.3.5-local # unused + version : 3.3.7-SNAPSHOT # Fake version, used only for choco tests java-version: 8 if: github.event_name == 'pull_request' && contains(github.event.pull_request.body, '[test_chocolatey]') needs: [ build-chocolatey-package ] diff --git a/.github/workflows/test-chocolatey.yml b/.github/workflows/test-chocolatey.yml index b6ca9bf74b12..e302968b9129 100644 --- a/.github/workflows/test-chocolatey.yml +++ b/.github/workflows/test-chocolatey.yml @@ -21,7 +21,10 @@ on: env: CHOCOLATEY-REPOSITORY: chocolatey-pkgs - DOTTY_CI_INSTALLATION: ${{ secrets.GITHUB_TOKEN }} + # Controls behaviour of chocolatey{Install,Uninstall}.ps1 scripts + # During snapshot releases it uses a different layout and requires access token to GH Actions artifacts + # During stable releases it uses publically available archives + DOTTY_CI_INSTALLATION: ${{ endsWith(inputs.version, '-SNAPSHOT') && secrets.GITHUB_TOKEN || '' }} jobs: test: From 85f54f1d2c239d7951deb47cd8fa21946d65d5c1 Mon Sep 17 00:00:00 2001 From: Tomasz Godzik Date: Thu, 3 Apr 2025 20:19:13 +0200 Subject: [PATCH 2/2] Fix chocolatey-test when used in stable releases [Cherry-picked 11238467eeffa9a2741668543a48a913fbf6f6e3][modified]