Make deploying windows binaries from appveyor work

This commit is contained in:
Bert Belder 2018-08-22 20:56:40 +02:00
parent 0c907715a3
commit c5bb412933
No known key found for this signature in database
GPG key ID: 7A77887B2E2ED461

View file

@ -9,10 +9,10 @@ environment:
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
DENO_BUILD_MODE: release DENO_BUILD_MODE: release
DENO_BUILD_PATH: $(APPVEYOR_BUILD_FOLDER)\out\release DENO_BUILD_PATH: $(APPVEYOR_BUILD_FOLDER)\out\release
RELEASE_ARTIFACT: $(APPVEYOR_BUILD_FOLDER)\out\release\deno_win_x64.zip
DENO_THIRD_PARTY_PATH: $(APPVEYOR_BUILD_FOLDER)\third_party DENO_THIRD_PARTY_PATH: $(APPVEYOR_BUILD_FOLDER)\third_party
CARGO_HOME: $(USERPROFILE)\.cargo CARGO_HOME: $(USERPROFILE)\.cargo
RUSTUP_HOME: $(USERPROFILE)\.rustup RUSTUP_HOME: $(USERPROFILE)\.rustup
RELEASE_ARTIFACT: deno_win_x64.zip
# Appveyor uses 7zip to pack cache directories. We use these options: # Appveyor uses 7zip to pack cache directories. We use these options:
# -t7z : Use '7z' format. The default is 'zip' which can't store symlinks. # -t7z : Use '7z' format. The default is 'zip' which can't store symlinks.
@ -331,16 +331,21 @@ after_test:
throw "Build should be up-to-date but isnt't." throw "Build should be up-to-date but isnt't."
} }
before_deploy: # If this build is going to be deployed, build a zip file.
- ps: |- - ps: |-
Compress-Archive -LiteralPath $env:DENO_BUILD_PATH/deno.exe ` if ($env:APPVEYOR_REPO_TAG) {
-CompressionLevel Optimal ` Compress-Archive -CompressionLevel Optimal -Force `
-DestinationPath $env:RELEASE_ARTIFACT -Path "$env:DENO_BUILD_PATH\deno.exe" `
-DestinationPath "$env:APPVEYOR_BUILD_FOLDER\$env:RELEASE_ARTIFACT"
}
artifacts:
path: $(RELEASE_ARTIFACT)
deploy: deploy:
provider: GitHub provider: GitHub
auth_token: auth_token:
secure: HQIIUEOtep3yRiBacZCtX8hVmgtdNvt6Hx7u9fP4Wj2ZYp+eBFP2OLf67RKVa5VZ secure: HQIIUEOtep3yRiBacZCtX8hVmgtdNvt6Hx7u9fP4Wj2ZYp+eBFP2OLf67RKVa5VZ
artifact: $env:RELEASE_ARTIFACT
on: on:
appveyor_repo_tag: true # deploy on tag push only APPVEYOR_REPO_NAME: denoland/deno
APPVEYOR_REPO_TAG: true