Skip to content

Commit

Permalink
Add workflow to release to winget (#21009)
Browse files Browse the repository at this point in the history
Closes #20381 

Depends the availability of an msi installer (#20547)
  • Loading branch information
hamzaremmal authored Jul 4, 2024
2 parents 010ed5a + 6d5388b commit 46fd269
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/publish-winget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
###################################################################################################
### THIS IS A REUSABLE WORKFLOW TO PUBLISH SCALA TO WINGET ###
### HOW TO USE: ###
### - THE RELEASE WORKFLOW SHOULD CALL THIS WORKFLOW ###
### - IT WILL PUBLISH THE MSI TO WINGET ###
### ###
### NOTE: ###
### - WE SHOULD KEEP IN SYNC THE https://github.com/dottybot/winget-pkgs REPOSITORY ###
###################################################################################################


name: Publish Scala to winget
run-name: Publish Scala ${{ inputs.version }} to winget

on:
workflow_call:
inputs:
version:
required: true
type: string
secrets:
DOTTYBOT-TOKEN:
required: true

jobs:
publish:
runs-on: windows-latest
steps:
- uses: vedantmgoyal9/winget-releaser@b87a066d9e624db1394edcd947f8c4e5a7e30cd7
with:
identifier : Scala.Scala.3
version : ${{ inputs.version }}
installers-regex: '\.msi$'
release-tag : ${{ inputs.version }}
fork-user : dottybot
token : ${{ secrets.DOTTYBOT-WINGET-TOKEN }}
9 changes: 8 additions & 1 deletion .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,12 @@ jobs:
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 }}

# TODO: ADD RELEASE WORKFLOW TO CHOCOLATEY AND OTHER PACKAGE MANAGERS HERE

0 comments on commit 46fd269

Please sign in to comment.