Skip to content

Commit edfc245

Browse files
committed
modify publish workflow to use secrets
1 parent 89605a0 commit edfc245

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,18 @@ jobs:
186186
if ($testResults.FailedCount -gt 0) {
187187
throw "Tests failed. Cannot publish to PowerShell Gallery."
188188
}
189+
190+
- name: Inject Values into Module
191+
shell: pwsh
192+
env:
193+
CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
194+
CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
195+
run: |
196+
$file = "./src/public/Initialize-Blogger.ps1"
197+
$content = Get-Content $file -Raw
198+
$content = $content -replace "<<CLIENT_ID>>", $env:CLIENT_ID
199+
$content = $content -replace "<<CLIENT_SECRET>>", $env:CLIENT_SECRET
200+
$content | Set-Content -Path $file -Force
189201
190202
- name: Publish to PowerShell Gallery
191203
shell: pwsh

0 commit comments

Comments
 (0)