Skip to content

Commit 3bce1ec

Browse files
committed
Add GH Action to publish on release creation
1 parent e00f4c6 commit 3bce1ec

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Publish module
2+
on:
3+
workflow_dispatch:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
terraform_publish:
9+
name: Publish module
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Publish module
14+
id: publish
15+
shell: pwsh
16+
run: |
17+
$apiKey = '${{ secrets.PS_GALLERY_API_KEY }}' | ConvertTo-SecureString -AsPlainText -Force
18+
$cred = [pscredential]::new('apikey', $apiKey)
19+
./build.ps1 -Task Test -PSGalleryApiKey $cred

0 commit comments

Comments
 (0)