forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1.79 KB
/
publish-chocolatey.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
###################################################################################################
### THIS IS A REUSABLE WORKFLOW TO PUBLISH SCALA TO CHOCOLATEY ###
### HOW TO USE: ###
### - THE RELEASE WORKFLOW SHOULD CALL THIS WORKFLOW ###
### - IT WILL PUBLISH TO CHOCOLATEY THE MSI ###
### ###
### NOTE: ###
### - WE SHOULD KEEP IN SYNC THE NAME OF THE MSI WITH THE ACTUAL BUILD ###
### - WE SHOULD KEEP IN SYNC THE URL OF THE RELEASE ###
### - IT ASSUMES THAT THE `build-chocolatey` WORKFLOW WAS EXECUTED BEFORE ###
###################################################################################################
name: Publish Scala to Chocolatey
run-name: Publish Scala ${{ inputs.version }} to Chocolatey
on:
workflow_call:
inputs:
version:
required: true
type: string
secrets:
# Connect to https://community.chocolatey.org/profiles/scala
# Accessible via https://community.chocolatey.org/account
API-KEY:
required: true
jobs:
publish:
runs-on: windows-latest
steps:
- name: Fetch the Chocolatey package from GitHub
uses: actions/download-artifact@v4
with:
name: scala.nupkg
- name: Publish the package to Chocolatey
run: choco push scala.nupkg --source https://push.chocolatey.org/ --api-key ${{ secrets.API-KEY }}