diff --git a/.github/workflows/publish-winget.yml b/.github/workflows/publish-winget.yml new file mode 100644 index 000000000000..03ebc5d0fa7d --- /dev/null +++ b/.github/workflows/publish-winget.yml @@ -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 }} \ No newline at end of file diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index 4b75dd1b737d..a4977bc5ffd9 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -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 \ No newline at end of file