1+ ---
12name : Prerelease Build
23
34on :
@@ -20,62 +21,62 @@ jobs:
2021 runs-on : ubuntu-latest
2122 steps :
2223 # Drafts your next Release notes as Pull Requests are merged into "master"
23- - name : Check out repository
24- uses : actions/checkout@v3
25- with :
26- fetch-depth : 0
27- - name : Display the path
28- shell : pwsh
29- run : echo ${env:PATH}
30- - name : Version Display
31- shell : pwsh
32- run : $PSVersionTable
33- - name : Bootstrap
34- shell : pwsh
35- run : ./actions_bootstrap.ps1
36- - name : Test and Build
37- shell : pwsh
38- run : Invoke-Build -File .\src\ALZ.build.ps1
39- - name : Upload pester results
40- uses : actions/upload-artifact@v3
41- with :
42- name : pester-results
43- path : .\src\Artifacts\testOutput
44- if-no-files-found : warn
45- - name : Upload zip module archive build
46- uses : actions/upload-artifact@v3
47- with :
48- name : zip-archive
49- path : .\src\Archive
50- if-no-files-found : warn
51- - uses : release-drafter/release-drafter@v5
52- id : create_release
53- with :
54- config-name : prerelease-drafter.yml
55- env :
56- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
57- - name : Package ALZ Module
58- shell : pwsh
59- run : |
60- $tag_version = "${{ steps.create_release.outputs.tag_name }}".Replace("-alpha", "")
61- ./package_ALZ.ps1 -version $tag_version -prerelease alpha
62- - uses : montudor/action-zip@v1
63- with :
24+ - name : Check out repository
25+ uses : actions/checkout@v3
26+ with :
27+ fetch-depth : 0
28+ - name : Display the path
29+ shell : pwsh
30+ run : echo ${env:PATH}
31+ - name : Version Display
32+ shell : pwsh
33+ run : $PSVersionTable
34+ - name : Bootstrap
35+ shell : pwsh
36+ run : ./actions_bootstrap.ps1
37+ - name : Test and Build
38+ shell : pwsh
39+ run : Invoke-Build -File .\src\ALZ.build.ps1
40+ - name : Upload pester results
41+ uses : actions/upload-artifact@v3
42+ with :
43+ name : pester-results
44+ path : .\src\Artifacts\testOutput
45+ if-no-files-found : warn
46+ - name : Upload zip module archive build
47+ uses : actions/upload-artifact@v3
48+ with :
49+ name : zip-archive
50+ path : .\src\Archive
51+ if-no-files-found : warn
52+ - uses : release-drafter/release-drafter@v5
53+ id : create_release
54+ with :
55+ config-name : prerelease-drafter.yml
56+ env :
57+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
58+ - name : Package ALZ Module
59+ shell : pwsh
60+ run : |
61+ $tag_version = "${{ steps.create_release.outputs.tag_name }}".Replace("-alpha", "")
62+ ./package_ALZ.ps1 -version $tag_version -prerelease alpha
63+ - uses : montudor/action-zip@v1
64+ with :
6465 args : zip -qq -r ALZ.zip ALZ
65- 66- env :
67- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
68- with :
69- upload_url : ${{ steps.create_release.outputs.upload_url }}
70- asset_path : ./ALZ.zip
71- asset_name : ALZ.zip
72- asset_content_type : application/zip
73- - uses : eregon/publish-release@v1
74- env :
75- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
76- with :
77- release_id : ${{ steps.create_release.outputs.id }}
78- - name : Publish ALZ Module
79- shell : pwsh
80- run : |
81- Publish-Module -Path "./ALZ" -NuGetApiKey ${{ secrets.POWERSHELL_GALLERY_KEY }} -ReleaseNotes "${{ steps.create_release.outputs.body }}" -Force
66+ 67+ env :
68+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
69+ with :
70+ upload_url : ${{ steps.create_release.outputs.upload_url }}
71+ asset_path : ./ALZ.zip
72+ asset_name : ALZ.zip
73+ asset_content_type : application/zip
74+ - uses : eregon/publish-release@v1
75+ env :
76+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
77+ with :
78+ release_id : ${{ steps.create_release.outputs.id }}
79+ - name : Publish ALZ Module
80+ shell : pwsh
81+ run : |
82+ Publish-Module -Path "./ALZ" -NuGetApiKey ${{ secrets.POWERSHELL_GALLERY_KEY }} -ReleaseNotes "${{ steps.create_release.outputs.body }}" -Force
0 commit comments