-
Notifications
You must be signed in to change notification settings - Fork 2
27 lines (24 loc) · 951 Bytes
/
psPublish.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
name: Publish ib2 Module
on:
push:
branches:
- master
paths:
- 'ib2/**'
jobs:
publish-to-gallery:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build and publish
env:
NUGET_KEY: ${{ secrets.PSGALLERY_NUGET_KEY }}
shell: pwsh
run: |
$moduleVersion=(import-powershellDataFile -Path ./ib2/ib2.psd1).ModuleVersion
if ((Find-Module ib2).version -ne $moduleVersion) {
#Nouvelle version : lancer la publication
update-ModuleManifest -Path ./ib2/ib2.psd1 -ModuleVersion $moduleVersion
Publish-Module -Path ./ib2 -NuGetApiKey $env:NUGET_KEY -Verbose
write-host "::notice title=Publication réussie::Publication de la version $moduleVersion vers la gallerie Powershell"}
else {write-host '::warning title=Version identique::La version n''a pas changé, pas de publication'}