forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (65 loc) · 2.98 KB
/
releases.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
###################################################################################################
### OFFICIAL RELEASE WORKFLOW ###
### HOW TO USE: ###
### - THIS WORKFLOW WILL NEED TO BE TRIGGERED MANUALLY ###
### ###
### NOTE: ###
### - THIS WORKFLOW SHOULD ONLY BE RUN ON STABLE RELEASES ###
### - IT ASSUMES THAT THE PRE-RELEASE WORKFLOW WAS PREVIOUSLY EXECUTED ###
### ###
###################################################################################################
name: Official release of Scala
run-name: Official release of Scala ${{ inputs.version }}
on:
workflow_dispatch:
inputs:
version:
description: 'The version to officially release'
required: true
type: string
jobs:
# TODO: ADD JOB TO SWITCH THE GITHUB RELEASE FROM DRAFT TO LATEST
publish-sdkman:
uses: ./.github/workflows/publish-sdkman.yml
with:
version: ${{ inputs.version }}
secrets:
CONSUMER-KEY: ${{ secrets.SDKMAN_KEY }}
CONSUMER-TOKEN: ${{ secrets.SDKMAN_TOKEN }}
publish-winget:
uses: ./.github/workflows/publish-winget.yml
with:
version: ${{ inputs.version }}
secrets:
DOTTYBOT-TOKEN: ${{ secrets.DOTTYBOT_WINGET_TOKEN }}
compute-digest:
runs-on: ubuntu-latest
outputs:
digest: ${{ steps.digest.outputs.digest }}
steps:
- name: Compute the SHA256 of scala3-${{ inputs.version }}-x86_64-pc-win32.zip in GitHub Release
id: digest
run: |
curl -o artifact.zip -L https://github.com/scala/scala3/releases/download/${{ inputs.version }}/scala3-${{ inputs.version }}-x86_64-pc-win32.zip
echo "digest=$(sha256sum artifact.zip | cut -d " " -f 1)" >> "$GITHUB_OUTPUT"
build-chocolatey:
uses: ./.github/workflows/build-chocolatey.yml
needs: compute-digest
with:
version: ${{ inputs.version }}
url : 'https://github.com/scala/scala3/releases/download/${{ inputs.version }}/scala3-${{ inputs.version }}-x86_64-pc-win32.zip'
digest : ${{ needs.compute-digest.outputs.digest }}
test-chocolatey:
uses: ./.github/workflows/test-chocolatey.yml
needs: build-chocolatey
with:
version : ${{ inputs.version }}
java-version: 8
publish-chocolatey:
uses: ./.github/workflows/publish-chocolatey.yml
needs: [ build-chocolatey, test-chocolatey ]
with:
version: ${{ inputs.version }}
secrets:
API-KEY: ${{ secrets.CHOCOLATEY_KEY }}
# TODO: ADD RELEASE WORKFLOW TO CHOCOLATEY AND OTHER PACKAGE MANAGERS HERE