-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.68 KB
/
release.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Release handling
on:
push:
tags:
- "v*"
jobs:
generate-release:
name: "Generate release"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
- name: "Build release package"
run: |
zip -r Office365-Scoutnet-synk.zip Office365-Scoutnet-synk
- name: Install needed modules
shell: pwsh
run: |
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module Microsoft.Graph.Authentication -ErrorAction Stop
Install-Module Microsoft.Graph.Users -ErrorAction Stop
Install-Module Microsoft.Graph.Users.Actions -ErrorAction Stop
Install-Module Microsoft.Graph.Groups -ErrorAction Stop
Install-Module ExchangeOnlineManagement -ErrorAction Stop
- name: Test-ModuleManifest
shell: pwsh
run: |
Test-ModuleManifest Office365-Scoutnet-synk/Office365-Scoutnet-synk.psd1 -ErrorAction Stop
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
LICENSE
MaillistSynk.ps1
MaillistSynk_local.ps1
Office365-Scoutnet-synk.zip
- name: "Publish to PowerShell Gallery"
env:
PS_GALLERY_KEY: ${{ secrets.PS_GALLERY_KEY }}
shell: pwsh
run: |
Write-Host -Object 'Publishing module (Office365-Scoutnet-synk) to PowerShell Gallery'
Publish-Module -Path Office365-Scoutnet-synk -NuGetApiKey $env:PS_GALLERY_KEY -Verbose -ErrorAction "Stop"
Write-Host -Object 'Finished publishing module to PowerShell Gallery'