From daa61b02b5914cd951bb72fc41164c0d4d4486b2 Mon Sep 17 00:00:00 2001 From: Gildas Cherruel Date: Sat, 27 Jan 2024 20:42:41 +0900 Subject: [PATCH] Added github actions to publish to the PowerShell gallery --- .github/workflows/publish.yml | 17 +++++++++++++++++ publish.ps1 | 2 ++ 2 files changed, 19 insertions(+) create mode 100644 .github/workflows/publish.yml create mode 100644 publish.ps1 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..786ae55 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,17 @@ +name: Publish +on: + push: + branches: [ master ] + workflow_dispatch: + +jobs: + build: + name: Publish + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Publish + env: + NUGET_API_KEY: ${{ secrets.NUGET_APIKEY }} + run: .\publish.ps1 + shell: pwsh diff --git a/publish.ps1 b/publish.ps1 new file mode 100644 index 0000000..8590474 --- /dev/null +++ b/publish.ps1 @@ -0,0 +1,2 @@ +$ModulePath = "$PSScriptRoot\posh-vpn" +Publish-Module -Path $ModulePath -NuGetApiKey $Env:NUGET_APIKEY