@@ -10,8 +10,68 @@ defaults:
10
10
jobs :
11
11
main :
12
12
name : " Main"
13
- uses : " hugoalh/hugoalh/.github/workflows/publish-powershell-module-psg.yml@main"
14
- with :
15
- path : " .\\ hugoalh.GitHubActionsToolkit\\ "
16
- secrets :
17
- POWERSHELLGALLERY_TOKEN : " ${{secrets.POWERSHELLGALLERY_TOKEN}}"
13
+ runs-on : " ubuntu-latest"
14
+ steps :
15
+ - name : " Checkout Repository"
16
+
17
+ - name : " Setup NodeJS"
18
+
19
+ with :
20
+ node-version : " 14"
21
+ check-latest : true
22
+ registry-url : " https://registry.npmjs.org/"
23
+ - name : " Setup PowerShell Toolkit"
24
+ uses :
" hugoalh-studio/[email protected] "
25
+ with :
26
+ version : " ^1.6.0"
27
+ - name : " Get NodeJS Wrapper Directory"
28
+ id : " nodejs-wrapper-directory"
29
+ run : |
30
+ Import-Module -Name 'hugoalh.GitHubActionsToolkit' -Scope 'Local'
31
+ [String]$NodeJSWrapperRoot = Join-Path -Path $Env:GITHUB_WORKSPACE -ChildPath 'hugoalh.GitHubActionsToolkit\nodejs-wrapper'
32
+ Set-GitHubActionsOutput -Name 'path' -Value $NodeJSWrapperRoot
33
+ - name : " Bundle NodeJS Wrapper Dependencies"
34
+ run : |
35
+ npm install --package-lock=false
36
+ working-directory : " ${{steps.nodejs-wrapper-directory.outputs.path}}"
37
+ - name : " Test Publish"
38
+ run : |
39
+ Publish-Module -Path '.\hugoalh.GitHubActionsToolkit\' -NugetAPIKey 'GUID' -WhatIf -Verbose
40
+ - name : " Publish"
41
+ run : |
42
+ Publish-Module -Path '.\hugoalh.GitHubActionsToolkit\' -NugetAPIKey '${{secrets.POWERSHELLGALLERY_TOKEN}}' -Verbose
43
+ main-fallback :
44
+ name : " Main (Fallback)"
45
+ needs :
46
+ - " main"
47
+ if : " ${{needs.main.result == 'failure'}}"
48
+ runs-on : " windows-latest"
49
+ steps :
50
+ - name : " Checkout Repository"
51
+
52
+ - name : " Setup NodeJS"
53
+
54
+ with :
55
+ node-version : " 14"
56
+ check-latest : true
57
+ registry-url : " https://registry.npmjs.org/"
58
+ - name : " Setup PowerShell Toolkit"
59
+ uses :
" hugoalh-studio/[email protected] "
60
+ with :
61
+ version : " ^1.6.0"
62
+ - name : " Get NodeJS Wrapper Directory"
63
+ id : " nodejs-wrapper-directory"
64
+ run : |
65
+ Import-Module -Name 'hugoalh.GitHubActionsToolkit' -Scope 'Local'
66
+ [String]$NodeJSWrapperRoot = Join-Path -Path $Env:GITHUB_WORKSPACE -ChildPath 'hugoalh.GitHubActionsToolkit\nodejs-wrapper'
67
+ Set-GitHubActionsOutput -Name 'path' -Value $NodeJSWrapperRoot
68
+ - name : " Bundle NodeJS Wrapper Dependencies"
69
+ run : |
70
+ npm install --package-lock=false
71
+ working-directory : " ${{steps.nodejs-wrapper-directory.outputs.path}}"
72
+ - name : " Test Publish"
73
+ run : |
74
+ Publish-Module -Path '.\hugoalh.GitHubActionsToolkit\' -NugetAPIKey 'GUID' -WhatIf -Verbose
75
+ - name : " Publish"
76
+ run : |
77
+ Publish-Module -Path '.\hugoalh.GitHubActionsToolkit\' -NugetAPIKey '${{secrets.POWERSHELLGALLERY_TOKEN}}' -Verbose
0 commit comments