Skip to content

Commit 3a0ec1c

Browse files
committed
Fixed upload of release asset !deploy !release
1 parent 6799ca7 commit 3a0ec1c

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Build/deploy.psdeploy.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,12 @@ if (
3333
$env:BHCommitMessage -match '!release'
3434
)
3535
{
36-
Compress-Archive -Path $env:BHModulePath -DestinationPath $env:BHProjectPath\$env:ModuleName-$env:ModuleVersion.zip
37-
if (-Not (Test-Path -Path $env:BHProjectPath\$env:ModuleName-$env:ModuleVersion.zip)) {
36+
$ReleaseAsset = "$env:BHProjectPath\$env:ModuleName-$env:ModuleVersion.zip"
37+
Compress-Archive -Path $env:BHModulePath -DestinationPath $ReleaseAsset
38+
if (-Not (Test-Path -Path $ReleaseAsset)) {
3839
Write-Error 'Failed to create archive for release'
3940
}
40-
"Created release asset $env:BHProjectPath\$env:ModuleName-$env:ModuleVersion.zip" |
41+
"Created release asset $ReleaseAsset" |
4142
Write-Host
4243

4344
$ReleaseNotes = 'PLEASE FILL MANUALLY'
@@ -92,7 +93,7 @@ if (
9293

9394
"Uploading asset to GitHub release" |
9495
Write-Host
95-
$RequestBody = Get-Content -Path $env:BHProjectPath\$env:BHProjectName-$env:ModuleVersion.zip -Raw
96+
$RequestBody = Get-Content -Path $ReleaseAsset -Raw
9697
$Result = Invoke-WebRequest -Method Post -Uri "https://uploads.github.com/repos/$ENV:APPVEYOR_REPO_NAME/releases/$GitHubReleaseId/assets?name=$env:BHProjectName-$env:ModuleVersion.zip" -Headers @{Authorization = "token $ENV:GitHubToken"} -ContentType 'application/zip' -Body $RequestBody
9798
if ($Result.StatusCode -ne 201) {
9899
Write-Error "Failed to upload release asset. Code $($Result.StatusCode): $($Result.Content)"

RELEASENOTES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 1.1.112
1+
# 1.1.113
22

33
- Integrated updated scripts from PowerShell-CI
44
- Fixed test for property

0 commit comments

Comments
 (0)