Skip to content

Commit 8187b96

Browse files
committed
Added publish workflow
1 parent 6d30ed3 commit 8187b96

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish to PSGallery and Create Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
runs-on: windows-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Install Modules
17+
shell: pwsh
18+
run: |
19+
Install-Module -Name Pester -RequiredVersion 4.10.1 -Force
20+
Install-Module -Name PSScriptAnalyzer -RequiredVersion 1.21.0 -Force
21+
- name: Run Pester Tests
22+
shell: pwsh
23+
run: Invoke-Pester -PassThru
24+
25+
- name: Publish to PSGallery
26+
shell: pwsh
27+
run: |
28+
Install-Module -Name PowerShellGet -Force -AllowClobber -Scope CurrentUser
29+
Publish-Module -Path (($PWD).Path) -NuGetApiKey ${{ secrets.PSGALLERYAPIKEY }}

0 commit comments

Comments
 (0)