generated from ironmansoftware/universal-dashboard-component
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.17 KB
/
publish.yml
File metadata and controls
46 lines (38 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Build and Publish to PowerShell Gallery
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build-and-publish:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '16'
- name: Install InvokeBuild
shell: pwsh
run: |
Install-Module -Name InvokeBuild -Force -Scope CurrentUser
- name: Build PowerShell module
shell: pwsh
run: |
Invoke-Build -File .\component.build.ps1
- name: Test module loads
shell: pwsh
run: |
$module = Test-ModuleManifest -Path .\output\UniversalDashboard.Mermaid.psd1
Write-Host "Module: $($module.Name)"
Write-Host "Version: $($module.Version)"
Write-Host "Author: $($module.Author)"
- name: Publish to PowerShell Gallery
shell: pwsh
run: |
Rename-Item .\output .\UniversalDashboard.Mermaid
Publish-Module -Path .\UniversalDashboard.Mermaid -NuGetApiKey $env:PSGALLERY_API_KEY -Verbose
env:
PSGALLERY_API_KEY: ${{ secrets.PSGALLERY_API_KEY }}