Skip to content

Commit 304fcb9

Browse files
committed
Fix testing and publishing chocolatey
1 parent 7c79db9 commit 304fcb9

File tree

3 files changed

+5
-29
lines changed

3 files changed

+5
-29
lines changed

.github/workflows/publish-chocolatey.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,4 @@ jobs:
3535
with:
3636
name: scala.nupkg
3737
- name: Publish the package to Chocolatey
38-
run: choco push scala.nupkg --source https://push.chocolatey.org/ --api-key ${{ secrets.API-KEY }}
39-
38+
run: choco push scala.${{inputs.version}}.nupkg --source https://push.chocolatey.org/ --api-key ${{ secrets.API-KEY }}

.github/workflows/releases.yml

-25
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,6 @@ permissions:
2424
contents: read
2525

2626
jobs:
27-
publish-sdkman:
28-
runs-on: [self-hosted, Linux]
29-
container:
30-
image: lampepfl/dotty:2021-03-22
31-
options: --cpu-shares 4096
32-
33-
env:
34-
SDKMAN_KEY: ${{ secrets.SDKMAN_KEY }}
35-
SDKMAN_TOKEN: ${{ secrets.SDKMAN_TOKEN }}
36-
37-
steps:
38-
- name: Reset existing repo
39-
run: |
40-
git config --global --add safe.directory /__w/dotty/dotty
41-
git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true
42-
43-
- name: Cleanup
44-
run: .github/workflows/cleanup.sh
45-
46-
- name: Git Checkout
47-
uses: actions/checkout@v4
48-
49-
- name: Publish to SDKMAN
50-
run: .github/workflows/scripts/publish-sdkman.sh ${{ inputs.version }}
51-
5227
compute-digest:
5328
runs-on: ubuntu-latest
5429
outputs:

.github/workflows/test-chocolatey.yml

+4-2
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:
@@ -48,4 +51,3 @@ jobs:
4851
run : scaladoc --version
4952
- name : Uninstall the `scala` package
5053
run : choco uninstall scala
51-

0 commit comments

Comments
 (0)