1- name : Releases
1+ # ##################################################################################################
2+ # ## OFFICIAL RELEASE WORKFLOW ###
3+ # ## HOW TO USE: ###
4+ # ## - THIS WORKFLOW WILL NEED TO BE TRIGGERED MANUALLY ###
5+ # ## ###
6+ # ## NOTE: ###
7+ # ## - THIS WORKFLOW SHOULD ONLY BE RUN ON STABLE RELEASES ###
8+ # ## - IT ASSUMES THAT THE PRE-RELEASE WORKFLOW WAS PREVIOUSLY EXECUTED ###
9+ # ## ###
10+ # ##################################################################################################
11+
12+ name : Official release of Scala
13+ run-name : Official release of Scala ${{ inputs.version }}
14+
215on :
316 workflow_dispatch :
417 inputs :
@@ -11,7 +24,7 @@ permissions:
1124 contents : read
1225
1326jobs :
14- publish_release :
27+ publish-sdkman :
1528 runs-on : [self-hosted, Linux]
1629 container :
1730 image : lampepfl/dotty:2021-03-22
3548
3649 - name : Publish to SDKMAN
3750 run : .github/workflows/scripts/publish-sdkman.sh ${{ inputs.version }}
51+
52+ compute-digest :
53+ runs-on : ubuntu-latest
54+ outputs :
55+ digest : ${{ steps.digest.outputs.digest }}
56+ steps :
57+ - name : Compute the SHA256 of scala3-${{ inputs.version }}.zip in GitHub Release
58+ id : digest
59+ run : |
60+ curl -o artifact.zip -L https://github.com/scala/scala3/releases/download/${{ inputs.version }}/scala3-${{ inputs.version }}.zip
61+ echo "digest=$(sha256sum artifact.zip | cut -d " " -f 1)" >> "$GITHUB_OUTPUT"
62+
63+ build-chocolatey :
64+ uses : ./.github/workflows/build-chocolatey.yml
65+ needs : compute-digest
66+ with :
67+ version : ${{ inputs.version }}
68+ url : ' https://github.com/scala/scala3/releases/download/${{ inputs.version }}/scala3-${{ inputs.version }}.zip'
69+ digest : ${{ needs.compute-digest.outputs.digest }}
70+ test-chocolatey :
71+ uses : ./.github/workflows/test-chocolatey.yml
72+ needs : build-chocolatey
73+ with :
74+ version : ${{ inputs.version }}
75+ java-version : 8
76+ publish-chocolatey :
77+ uses : ./.github/workflows/publish-chocolatey.yml
78+ needs : [ build-chocolatey, test-chocolatey ]
79+ with :
80+ version : ${{ inputs.version }}
81+ secrets :
82+ API-KEY : ${{ secrets.CHOCOLATEY_KEY }}
0 commit comments