-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (50 loc) · 2.33 KB
/
Publish-Module.yml
File metadata and controls
54 lines (50 loc) · 2.33 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
47
48
49
50
51
52
53
54
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 and create releases
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@2e548cfd1c68b76129fdeabc7f7caebd47e3b1c3 # v2.2.2
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 }}
AutoPatching: ${{ fromJson(inputs.Settings).Publish.Module.AutoPatching }}
DatePrereleaseFormat: ${{ fromJson(inputs.Settings).Publish.Module.DatePrereleaseFormat }}
IgnoreLabels: ${{ fromJson(inputs.Settings).Publish.Module.IgnoreLabels }}
ReleaseType: ${{ fromJson(inputs.Settings).Publish.Module.ReleaseType }}
IncrementalPrerelease: ${{ fromJson(inputs.Settings).Publish.Module.IncrementalPrerelease }}
MajorLabels: ${{ fromJson(inputs.Settings).Publish.Module.MajorLabels }}
MinorLabels: ${{ fromJson(inputs.Settings).Publish.Module.MinorLabels }}
PatchLabels: ${{ fromJson(inputs.Settings).Publish.Module.PatchLabels }}
VersionPrefix: ${{ fromJson(inputs.Settings).Publish.Module.VersionPrefix }}
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 }}