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
+
2
15
on :
3
16
workflow_dispatch :
4
17
inputs :
@@ -11,7 +24,7 @@ permissions:
11
24
contents : read
12
25
13
26
jobs :
14
- publish_release :
27
+ publish-sdkman :
15
28
runs-on : [self-hosted, Linux]
16
29
container :
17
30
image : lampepfl/dotty:2021-03-22
35
48
36
49
- name : Publish to SDKMAN
37
50
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