-
Notifications
You must be signed in to change notification settings - Fork 10
47 lines (39 loc) · 1.26 KB
/
publish.yml
File metadata and controls
47 lines (39 loc) · 1.26 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
name: Publish to PowerShell Gallery
on:
workflow_run:
workflows: ["CI"]
types: [completed]
branches: [main]
workflow_dispatch:
permissions:
contents: read
actions: read
concurrency:
group: publish-powershell-gallery
cancel-in-progress: true
env:
MODULE_NAME: Convert
jobs:
publish:
name: Publish module
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
with:
sparse-checkout: .build/Invoke-PublishModule.ps1
sparse-checkout-cone-mode: false
- name: Download module artifact
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e
with:
name: ${{ env.MODULE_NAME }}-Module-Universal
path: Artifacts/
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to PowerShell Gallery
shell: pwsh
env:
PSGALLERY_API_KEY: ${{ secrets.PSGALLERY_API_KEY }}
run: ./.build/Invoke-PublishModule.ps1 -ModuleName ${{ env.MODULE_NAME }} -ArtifactPath Artifacts