Skip to content

Commit 9b520bd

Browse files
authored
Create deployment.yml
Create a workflow to deploy to PowerShell gallery
1 parent 96ebc95 commit 9b520bd

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/deployment.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: deployment
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
runs-on: windows-latest
9+
environment: production
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Install PesterExtensions
13+
shell: pwsh
14+
run: |
15+
Set-PSRepository PSGallery -InstallationPolicy Trusted
16+
Install-Module PesterExtensions -RequiredVersion 0.4.0.23
17+
- name: Generate Module manifest file
18+
run: .\setup.ps1 -Revision ${{ github.run_number }}
19+
- name: Run tests
20+
run: .\tests.ps1 -RunNumber ${{ github.run_number }}
21+
- name: deploy
22+
run: Publish-Module -Path ${{ env.MODULE_PATH }} -NuGetApiKey ${{ secrets.POWERSHELL_GALLERY_KEY }}

0 commit comments

Comments
 (0)