Skip to content

Commit 27a73e9

Browse files
committed
Fix chocolatey-test when used in stable releases
1 parent b3a3738 commit 27a73e9

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/ci.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -911,14 +911,14 @@ jobs:
911911
uses: ./.github/workflows/build-chocolatey.yml
912912
needs: [ build-sdk-package ]
913913
with:
914-
version: 3.6.0-local # TODO: FIX THIS
914+
version: 3.6.0-SNAPSHOT # Fake version, used only for choco tests
915915
url : https://api.github.com/repos/scala/scala3/actions/artifacts/${{ needs.build-sdk-package.outputs.win-x86_64-id }}/zip
916916
digest : ${{ needs.build-sdk-package.outputs.win-x86_64-digest }}
917917

918918
test-chocolatey-package:
919919
uses: ./.github/workflows/test-chocolatey.yml
920920
with:
921-
version : 3.6.0-local # TODO: FIX THIS
921+
version : 3.6.0-SNAPSHOT # Fake version, used only for choco tests
922922
java-version: 8
923923
if: github.event_name == 'pull_request' && contains(github.event.pull_request.body, '[test_chocolatey]')
924924
needs: [ build-chocolatey-package ]

.github/workflows/test-chocolatey.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ on:
2121

2222
env:
2323
CHOCOLATEY-REPOSITORY: chocolatey-pkgs
24-
DOTTY_CI_INSTALLATION: ${{ secrets.GITHUB_TOKEN }}
24+
# Controls behaviour of chocolatey{Install,Uninstall}.ps1 scripts
25+
# During snapshot releases it uses a different layout and requires access token to GH Actions artifacts
26+
# During stable releases it uses publically available archives
27+
DOTTY_CI_INSTALLATION: ${{ endsWith(inputs.version, '-SNAPSHOT') && secrets.GITHUB_TOKEN || '' }}
2528

2629
jobs:
2730
test:

0 commit comments

Comments
 (0)