11name : Publish PowerShell Module
22
33on :
4- release :
5- types : [published]
4+ release :
5+ types : [published]
66
77jobs :
8- publish-to-gallery :
9- runs-on : ubuntu-latest
10- steps :
11- - uses : actions/checkout@v5
12- - name : Set PSRepository to Trusted for PowerShell Gallery
13- shell : pwsh
14- run : |
15- Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
16- - name : Install AsBuiltReport.Core module
17- shell : pwsh
18- run : |
19- Install-Module -Name AsBuiltReport.Core -Repository PSGallery -Force
20- - name : Install NetApp.ONTAP module
21- shell : pwsh
22- run : |
23- Install-Module -Name NetApp.ONTAP -Repository PSGallery -Force
24- - name : Install Diagrammer.Core module
25- shell : pwsh
26- run : |
27- Install-Module -Name Diagrammer.Core -Repository PSGallery -Force
28- - name : Test Module Manifest
29- shell : pwsh
30- run : |
31- Test-ModuleManifest .\AsBuiltReport.NetApp.ONTAP.psd1
32- - name : Publish module to PowerShell Gallery
33- shell : pwsh
34- run : |
35- Publish-Module -Path ./ -NuGetApiKey ${{ secrets.PSGALLERY_API_KEY }} -Verbose
36- tweet :
37- needs : publish-to-gallery
38- runs-on : ubuntu-latest
39- steps :
40- - uses : Eomm/why-don-t-you-tweet@v2
41- # We don't want to tweet if the repository is not a public one
42- if : ${{ !github.event.repository.private }}
43- with :
44- # GitHub event payload
45- # https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release
46- tweet-message : " [New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #Netapp #AsBuiltReport #PowerShell #Ontap #NetAppATeam"
47- env :
48- TWITTER_CONSUMER_API_KEY : ${{ secrets.TWITTER_CONSUMER_API_KEY }}
49- TWITTER_CONSUMER_API_SECRET : ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
50- TWITTER_ACCESS_TOKEN : ${{ secrets.TWITTER_ACCESS_TOKEN }}
51- TWITTER_ACCESS_TOKEN_SECRET : ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
52- bsky-post :
53- needs : publish-to-gallery
54- runs-on : ubuntu-latest
55- steps :
56- -
uses :
zentered/[email protected] 57- with :
58- post : " [New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #Netapp #AsBuiltReport #PowerShell #Ontap #NetAppATeam"
59- env :
60- BSKY_IDENTIFIER : ${{ secrets.BSKY_IDENTIFIER }}
61- BSKY_PASSWORD : ${{ secrets.BSKY_PASSWORD }}
8+ publish-to-gallery :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v5
12+ - name : Set PSRepository to Trusted for PowerShell Gallery
13+ shell : pwsh
14+ run : |
15+ Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
16+ - name : Install AsBuiltReport.Core module
17+ shell : pwsh
18+ run : |
19+ Install-Module -Name AsBuiltReport.Core -Repository PSGallery -Force
20+ - name : Install NetApp.ONTAP module
21+ shell : pwsh
22+ run : |
23+ Install-Module -Name NetApp.ONTAP -Repository PSGallery -Force
24+ - name : Install Diagrammer.Core module
25+ shell : pwsh
26+ run : |
27+ Install-Module -Name Diagrammer.Core -Repository PSGallery -Force
28+ - name : Test Module Manifest
29+ shell : pwsh
30+ run : |
31+ Test-ModuleManifest .\AsBuiltReport.NetApp.ONTAP.psd1
32+ - name : Publish module to PowerShell Gallery
33+ shell : pwsh
34+ run : |
35+ Publish-Module -Path ./ -NuGetApiKey ${{ secrets.PSGALLERY_API_KEY }} -Verbose
36+ tweet :
37+ needs : publish-to-gallery
38+ runs-on : ubuntu-latest
39+ steps :
40+ - uses : Eomm/why-don-t-you-tweet@v2
41+ # We don't want to tweet if the repository is not a public one
42+ if : ${{ !github.event.repository.private }}
43+ with :
44+ # GitHub event payload
45+ # https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release
46+ tweet-message : " [New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #Netapp #AsBuiltReport #PowerShell #Ontap #NetAppATeam"
47+ env :
48+ TWITTER_CONSUMER_API_KEY : ${{ secrets.TWITTER_CONSUMER_API_KEY }}
49+ TWITTER_CONSUMER_API_SECRET : ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
50+ TWITTER_ACCESS_TOKEN : ${{ secrets.TWITTER_ACCESS_TOKEN }}
51+ TWITTER_ACCESS_TOKEN_SECRET : ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
52+ bsky-post :
53+ needs : publish-to-gallery
54+ runs-on : ubuntu-latest
55+ steps :
56+ -
uses :
zentered/[email protected] 57+ with :
58+ post : " [New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #Netapp #AsBuiltReport #PowerShell #Ontap #NetAppATeam"
59+ env :
60+ BSKY_IDENTIFIER : ${{ secrets.BSKY_IDENTIFIER }}
61+ BSKY_PASSWORD : ${{ secrets.BSKY_PASSWORD }}
0 commit comments