Skip to content

Commit 3114488

Browse files
authored
Merge pull request #214 from scala/backport-lts-3.3-22415
Backport "Fix chocolatey-test when used in stable releases" to 3.3 LTS
2 parents 3c1ff9a + 85f54f1 commit 3114488

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.github/workflows/ci.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -782,14 +782,14 @@ jobs:
782782
uses: ./.github/workflows/build-chocolatey.yml
783783
needs: [ build-sdk-package ]
784784
with:
785-
version: 3.3.5-local # unused
786-
url : https://api.github.com/repos/scala/scala3/actions/artifacts/${{ needs.build-sdk-package.outputs.universal-id }}/zip
787-
digest : ${{ needs.build-sdk-package.outputs.universal-digest }}
785+
version: 3.3.7-SNAPSHOT # Fake version, used only for choco tests
786+
url : https://api.github.com/repos/scala/scala3/actions/artifacts/${{ needs.build-sdk-package.outputs.win-x86_64-id }}/zip
787+
digest : ${{ needs.build-sdk-package.outputs.win-x86_64-digest }}
788788

789789
test-chocolatey-package:
790790
uses: ./.github/workflows/test-chocolatey.yml
791791
with:
792-
version : 3.3.5-local # unused
792+
version : 3.3.7-SNAPSHOT # Fake version, used only for choco tests
793793
java-version: 8
794794
if: github.event_name == 'pull_request' && contains(github.event.pull_request.body, '[test_chocolatey]')
795795
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)