Skip to content

Commit 0d3111e

Browse files
committed
First draft of the workflow to publish to Chocolatey
1 parent 0934b95 commit 0d3111e

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
###################################################################################################
2+
### THIS IS A REUSABLE WORKFLOW TO PUBLISH SCALA TO CHOCOLATEY ###
3+
### HOW TO USE: ###
4+
### - THE RELEASE WORKFLOW SHOULD CALL THIS WORKFLOW ###
5+
### - IT WILL PUBLISH TO CHOCOLATEY THE MSI ###
6+
### ###
7+
### NOTE: ###
8+
### - WE SHOULD KEEP IN SYNC THE NAME OF THE MSI WITH THE ACTUAL BUILD ###
9+
### - WE SHOULD KEEP IN SYNC THE URL OF THE RELEASE ###
10+
###################################################################################################
11+
12+
13+
name: Publish Scala to Chocolatey
14+
run-name: Publish Scala ${{ inputs.version }} to Chocolatey
15+
16+
on:
17+
workflow_call:
18+
inputs:
19+
version:
20+
required: true
21+
type: string
22+
secrets:
23+
# Connect to https://community.chocolatey.org/profiles/scala
24+
# Accessible via https://community.chocolatey.org/account
25+
API-KEY:
26+
required: true
27+
28+
env:
29+
RELEASE-URL: 'https://github.com/scala/scala3/releases/download/${{ inputs.version }}'
30+
MSI_FILE : 'scala3-${{ inputs.version }}.msi'
31+
32+
jobs:
33+
build:
34+
runs-on: windows-latest
35+
steps:
36+
- run: echo hello world # TODO: ACTUALLY BUILD THE .nupkg
37+
38+
publish:
39+
runs-on: windows-latest
40+
needs: build
41+
steps:
42+
- run: echo hello world # TODO: ACTUALLY PUBLISH THE PACKAGE

0 commit comments

Comments
 (0)