From d931331b5783c8c11f6f9af4c1cd61e1af269dfa Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Wed, 17 Aug 2022 23:01:34 +0800 Subject: [PATCH] Add a manual run workflow for winget submission (#6345) --- .github/workflows/manual.yml | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/manual.yml diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml new file mode 100644 index 0000000000..c0817ab4e9 --- /dev/null +++ b/.github/workflows/manual.yml @@ -0,0 +1,40 @@ +# This is a basic workflow that is manually triggered +# Don't run it unless you know what you are doing + +name: Manual Workflow for Winget Submission + +# Controls when the action will run. Workflow runs when manually triggered using the UI +# or API. +on: + workflow_dispatch: + # Inputs the workflow accepts. + inputs: + ver: + # Friendly description to be shown in the UI instead of 'ver' + description: 'The nushell version to release' + # Default value if no value is explicitly provided + default: '0.66.0' + # Input has to be provided for the workflow to run + required: true + uri: + # Friendly description to be shown in the UI instead of 'uri' + description: 'The nushell windows .msi package URI to publish' + # Default value if no value is explicitly provided + default: 'https://github.com/nushell/nushell/releases/download/0.66.0/nu-0.66.0-x86_64-pc-windows-msvc.msi' + # Input has to be provided for the workflow to run + required: true + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job + rls-winget-pkg: + # The type of runner that the job will run on + runs-on: windows-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Runs commands using the runners shell + - name: Submit package to Windows Package Manager Community Repository Manually + run: | + iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe + .\wingetcreate.exe update Nushell.Nushell -s -v ${{ github.event.inputs.ver }} -u ${{ github.event.inputs.uri }} -t ${{ secrets.NUSHELL_PAT }}