diff --git a/.github/workflows/publish-on-release.yml b/.github/workflows/publish-on-release.yml new file mode 100644 index 0000000..479a78f --- /dev/null +++ b/.github/workflows/publish-on-release.yml @@ -0,0 +1,28 @@ +# File: .github/workflows/publish-on-release.yml + +on: + release: + types: + - "published" + workflow_dispatch: + +name: Publish Module to PSGallery + +jobs: + publish: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Az.Resources module + shell: pwsh + run: | + Set-PSRepository PSGallery -InstallationPolicy Trusted + Install-Module Az.Resources + - name: Publish module + shell: pwsh + id: publish-module + run: | + Publish-Module -Path ./src/PSCO2Signal -NuGetApiKey ${{ secrets.PS_GALLERY_KEY }} + Write-Output "## PSCO2Signal published to PSGallery" >> $env:GITHUB_STEP_SUMMARY \ No newline at end of file