-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
"Adding Chocolatey package and updates to auto adding various assets …
…to each release. Also updated some manifest things. No Code changes, really just a maintenance release"
- Loading branch information
1 parent
610165c
commit 6f0aa16
Showing
7 changed files
with
946 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,7 @@ jobs: | |
env: | ||
GH_TOKEN: ${{ github.token }} | ||
GalKey: ${{ secrets.PSGALLERY }} | ||
ChocoKey: ${{ secrets.CHOCOLATEY }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: fregante/[email protected] | ||
|
@@ -69,6 +70,31 @@ jobs: | |
Publish-PSResource -apikey $env:GalKey -Path .\_module_build\FogApi -Repository PSGallery; | ||
"Creating Github Release..." | out-host; | ||
gh release create $version --latest --generate-notes --target master | ||
"Zipping up built and published module..." | out-host; | ||
Compress-Archive -Path .\_module_build\FogApi -DestinationPath ".\_module_build\FogApi.$version.BuiltModule.zip" | ||
"Downloading published nupkg..." | out-host; | ||
$webClient = [System.Net.WebClient]::new(); | ||
$url = "https://www.powershellgallery.com/api/v2/package/FogApi/$version" | ||
$webClient.DownloadFile($url,"$PWD\_module_build\FogApi.$version.psgallery.nupkg") | ||
"Adding assets to release..." | out-host; | ||
gh release upload $version ".\_module_build\FogApi.$version.psgallery.nupkg" | ||
gh release upload $version ".\_module_build\FogApi.$version.BuiltModule.zip" | ||
"building choco package..." | out-host; | ||
.\build-choco.ps1; | ||
"adding choco package to release" | out-host; | ||
copy-item ".\FogApi.$version.nupkg" ".\FogApi.$version.chocolatey.nupkg" | ||
gh release upload $version ".\FogApi.$version.chocolatey.nupkg" | ||
remove-item ".\FogApi.$version.chocolatey.nupkg" -force -recurse -ea 0; | ||
"publishing choco package..." | out-host; | ||
choco apikey add -s "https://push.chocolatey.org/" -k="$env:ChocoKey" | ||
choco apikey add -s "https://community.chocolatey.org/api/v2/" -k="$env:ChocoKey" | ||
choco push "FogApi.$version.nupkg" --source https://push.chocolatey.org/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.