From 97b8e377050fb236c22c154e6e53501b028b2150 Mon Sep 17 00:00:00 2001 From: Hamza REMMAL Date: Thu, 4 Jul 2024 02:00:23 +0200 Subject: [PATCH 1/2] Add workflow to release to winget --- .github/workflows/publish-winget.yml | 36 ++++++++++++++++++++++++++++ .github/workflows/releases.yml | 9 ++++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish-winget.yml diff --git a/.github/workflows/publish-winget.yml b/.github/workflows/publish-winget.yml new file mode 100644 index 000000000000..8515f95ad799 --- /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 TO WINGET THE MSI ### +### ### +### 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 From 6d5388bcf8613f7a951c7b3617717f4138ffb4a9 Mon Sep 17 00:00:00 2001 From: Hamza Remmal Date: Thu, 4 Jul 2024 15:01:11 +0200 Subject: [PATCH 2/2] Update .github/workflows/publish-winget.yml Co-authored-by: Piotr Chabelski --- .github/workflows/publish-winget.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-winget.yml b/.github/workflows/publish-winget.yml index 8515f95ad799..03ebc5d0fa7d 100644 --- a/.github/workflows/publish-winget.yml +++ b/.github/workflows/publish-winget.yml @@ -2,7 +2,7 @@ ### THIS IS A REUSABLE WORKFLOW TO PUBLISH SCALA TO WINGET ### ### HOW TO USE: ### ### - THE RELEASE WORKFLOW SHOULD CALL THIS WORKFLOW ### -### - IT WILL PUBLISH TO WINGET THE MSI ### +### - IT WILL PUBLISH THE MSI TO WINGET ### ### ### ### NOTE: ### ### - WE SHOULD KEEP IN SYNC THE https://github.com/dottybot/winget-pkgs REPOSITORY ###