-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (32 loc) · 936 Bytes
/
Publish.yml
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
# This is a basic workflow to help you get started with Actions
name: Publish to Packages
# Controls when the workflow will run
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install ModuleTools module form PSGallery
run: |
Install-PSResource -Repository PSGallery -Name ModuleTools -TrustRepository
shell: pwsh
- name: Build Module
run: Invoke-MTBuild -Verbose
shell: pwsh
- name: Run Pester Tests
run: Invoke-MTTest
shell: pwsh
- name: List files
run: Get-ChildItem ./dist -Recurse
shell: pwsh
- name: Publish Package to Github
run: |
Publish-PSResource -Path ./dist/ModuleTools -Repository PSGallery -ApiKey $Env:ApiKey
env:
ApiKey: ${{ secrets.PSGALLERY_API }}
shell: pwsh