-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (41 loc) · 1.54 KB
/
Copy pathPublish-Module.yml
File metadata and controls
45 lines (41 loc) · 1.54 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
name: Publish-Module
on:
workflow_call:
secrets:
APIKey:
description: The API key for the PowerShell Gallery.
required: true
inputs:
Settings:
type: string
description: The complete settings object.
required: true
permissions:
contents: write # to checkout the repo, create releases, and upload release artifacts
pull-requests: write # to comment on PRs
jobs:
Publish-Module:
name: Publish-Module
runs-on: ubuntu-latest
env:
SETTINGS: ${{ inputs.Settings }}
steps:
- name: Checkout Code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
fetch-depth: 0
- name: Publish module
uses: PSModule/Publish-PSModule@main
env:
GH_TOKEN: ${{ github.token }}
with:
Name: ${{ fromJson(inputs.Settings).Name }}
ModulePath: outputs/module
APIKey: ${{ secrets.APIKEY }}
WhatIf: ${{ github.repository == 'PSModule/Process-PSModule' }}
AutoCleanup: ${{ fromJson(inputs.Settings).Publish.Module.AutoCleanup }}
UsePRTitleAsReleaseName: ${{ fromJson(inputs.Settings).Publish.Module.UsePRTitleAsReleaseName }}
UsePRBodyAsReleaseNotes: ${{ fromJson(inputs.Settings).Publish.Module.UsePRBodyAsReleaseNotes }}
UsePRTitleAsNotesHeading: ${{ fromJson(inputs.Settings).Publish.Module.UsePRTitleAsNotesHeading }}
WorkingDirectory: ${{ fromJson(inputs.Settings).WorkingDirectory }}