-
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (66 loc) · 2.04 KB
/
release.yml
File metadata and controls
75 lines (66 loc) · 2.04 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Release
run-name: "${{ github.event.repository.name }} | Release | ${{ github.run_id }}"
permissions: read-all
on:
workflow_dispatch:
inputs:
release-type:
description: 'Release type'
required: true
default: 'Release'
type: choice
options:
- Release
- Prerelease
publish-psgallery:
description: 'Publish release to PSGallery'
required: false
type: boolean
default: true
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install GitVersion tool
uses: gittools/actions/gitversion/setup@b3e1c2f9b6983393b289892d140d220011a58c4e
with:
versionSpec: '6.5.1'
- name: Get semantic build version
id: gitversion
uses: gittools/actions/gitversion/execute@b3e1c2f9b6983393b289892d140d220011a58c4e
with:
configFilePath: GitVersion.yml
disableShallowCloneCheck: true
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: '9.0.x'
- name: Setup PowerShell
shell: pwsh
run: |
Install-PSResource -Name InvokeBuild, Pester -TrustRepository -AcceptLicense
- name: Build Module
shell: pwsh
run: |
Invoke-Build -Task Build, Test -SemanticVersion ${{ steps.gitversion.outputs.majorMinorPatch }} -Configuration Release
- name: Build Module
id: build
uses: ./.github/actions/ps-build
with:
release-type: ${{ inputs['release-type'] }}
- name: Release Module
uses: ./.github/actions/ps-release
env:
PSGALLERY_API_KEY: ${{ secrets.NUGETAPIKEY_PSGALLERY }}
with:
release-version: ${{ steps.build.outputs.release-version }}
publish-psgallery: ${{ inputs.publish-psgallery }}