-
Notifications
You must be signed in to change notification settings - Fork 38
24 lines (20 loc) · 933 Bytes
/
publish-script.yml
File metadata and controls
24 lines (20 loc) · 933 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
name: Publish PowerShell Script
on:
workflow_dispatch:
jobs:
Publish-Script:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Publish to PowerShell Gallery
shell: pwsh
run: |
$env:PSGalleryApiKey = "${{ secrets.NUGET_KEY }}"
Publish-Script -Path ./DeviceOffboardingManager.ps1 -Repository PSGallery -NuGetApiKey $env:PSGalleryApiKey
- name: Add Gallery Link to Summary
shell: bash
run: |
version=$(grep -Po '^\.VERSION \K[0-9.]+' ./DeviceOffboardingManager.ps1)
echo "Successfully published [DeviceOffboardingManager version $version](https://www.powershellgallery.com/packages/DeviceOffboardingManager/$version) to PowerShell Gallery." >> $GITHUB_STEP_SUMMARY
echo "View the package at: https://www.powershellgallery.com/packages/DeviceOffboardingManager/$version"