diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 01d5f41..24d4411 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,6 +16,7 @@ permissions: jobs: release-module: runs-on: windows-latest + if: github.event.before != '0000000000000000000000000000000000000000' env: GITHUB_OWNER: ${{ github.repository_owner }} diff --git a/README.md b/README.md index cf10511..c35342d 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,17 @@ It will produce release notes, changelog and a nupkg in GitHub packages. __Note__: _this will fail if the version is not bumped, or if the current version already exists as a release or package._ +### Publish to PSGallery + +A manually triggered workflow is available to publish your module to the [PowerShell Gallery](https://www.powershellgallery.com/). +This workflow downloads the `.nupkg` from the latest GitHub release and pushes it to PSGallery. + +To use this workflow: + +1. Ensure a GitHub release exists with a `.nupkg` asset (created automatically by the merge to master pipeline). +2. Add a `PSGALLERY_API_KEY` secret to your repository or organisation. You can generate an API key from your [PSGallery account](https://www.powershellgallery.com/account). +3. Navigate to the **Actions** tab, select the **Publish to PSGallery** workflow, and click **Run workflow**. + ### After merge After merging to master, markdown files for each public function in the module will be created.