File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 55RootModule = ' PSBlogger.psm1'
66
77# Version number of this module.
8- ModuleVersion = ' 0.2 .0'
8+ ModuleVersion = ' 0.3 .0'
99
1010# Supported PSEditions
1111# CompatiblePSEditions = @()
@@ -20,7 +20,7 @@ Author = 'Bryan Cook'
2020CompanyName = ' Bryan Cook'
2121
2222# Copyright statement for this module
23- Copyright = ' #169; me'
23+ # Copyright = '#169; me'
2424
2525# Description of the functionality provided by this module
2626Description = ' Module to publish markdown files to Blogger'
@@ -97,16 +97,16 @@ PrivateData = @{
9797 Tags = ' blogger' , ' markdown' , ' pandoc'
9898
9999 # A URL to the license for this module.
100- # LicenseUri = ''
100+ LicenseUri = ' https://github.com/bryanbcook/PSBlogger?tab=MIT-1-ov-file#readme '
101101
102102 # A URL to the main website for this project.
103- ProjectUri = ' http ://www.bryancook.net/ '
103+ ProjectUri = ' https ://github.com/bryanbcook/PSBlogger '
104104
105105 # A URL to an icon representing this module.
106106 # IconUri = ''
107107
108108 # ReleaseNotes of this module
109- # ReleaseNotes = ''
109+ ReleaseNotes = ' https://github.com/bryanbcook/PSBlogger/releases '
110110 # Prerelease string of this module
111111 # Prerelease = ''
112112
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ function Add-GoogleDriveFile {
3030 [string ]$FileName ,
3131
3232 [Parameter ()]
33- [string ]$TargetFolderName = " Open Live Writer " ,
33+ [string ]$TargetFolderName = " PSBlogger " ,
3434
3535 [Parameter ()]
3636 [switch ]$Force
Original file line number Diff line number Diff line change @@ -53,10 +53,12 @@ function Get-GoogleDriveItems {
5353 $q += " '$ParentId ' in parents"
5454 }
5555
56+ $q += " trashed=false" # Exclude trashed items
57+
5658 $queryArgs = @ {
5759 q = [System.Web.HttpUtility ]::UrlEncode($q -join ' and ' )
5860 pageSize = 40
59- }
61+ }
6062
6163 do {
6264
Original file line number Diff line number Diff line change @@ -25,10 +25,10 @@ Initiate a login flow with Google
2525Function Initialize-Blogger {
2626 Param (
2727 [Parameter (HelpMessage = " Google API ClientId" )]
28- [string ]$clientId = " 284606892422-ribvo7oodlbtd70e8onn8rg4hm58mluj.apps.googleusercontent.com " ,
28+ [string ]$clientId = " <<CLIENT_ID>> " ,
2929
3030 [Parameter (HelpMessage = " Google API Client Secret" )]
31- [string ]$clientSecret = " PUK0j9ig-GHcSByQao2i1aIa " ,
31+ [string ]$clientSecret = " <<CLIENT_SECRET>> " ,
3232
3333 [Parameter (HelpMessage = " Redirect Uri specified in Google API Consent Form" )]
3434 [string ]$redirectUri = " http://localhost/oauth2callback"
@@ -41,8 +41,7 @@ Function Initialize-Blogger {
4141 # specify the scopes we want in our auth token
4242 $scope = @ (
4343 " https://www.googleapis.com/auth/blogger"
44- # "https://www.googleapis.com/auth/drive.file" # TODO: fix
45- " https://www.googleapis.com/auth/drive"
44+ " https://www.googleapis.com/auth/drive.file"
4645
4746 ) -join " "
4847
You can’t perform that action at this time.
0 commit comments