Skip to content

Instantly share code, notes, and snippets.

@s00d
Created August 21, 2020 09:18
Show Gist options
  • Save s00d/5ad3d87463947c84033a7ad24ee665b0 to your computer and use it in GitHub Desktop.
Save s00d/5ad3d87463947c84033a7ad24ee665b0 to your computer and use it in GitHub Desktop.
image:
- Visual Studio 2019
- Ubuntu
- macOS
environment:
prebuild_upload:
secure: a/seaM+nUnQWhWUnbyz8fl9vPwuyqDTrFviptDykYp2c46vdTvlAxU6yqD/PpDiI
COVERALLS_REPO_TOKEN:
secure: iDcAJCYgJK4tffyzEHbMVR8DatJcIN8eY0h29p9JQkl43TcEcm6Z6JLOBpGDk1MJ
matrix:
- nodejs_version: "12"
binary_builder: "true"
platform:
- x86
- x64
install:
- cmd: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:platform;
- sh: nvm install $nodejs_version $env:platform
- cmd: >
@{
"nodejs_version" = $env:nodejs_version
"platform" = $env:platform
"node binary version" = $(node -v)
"node platform@arch" = $(node -p 'process.platform + process.arch')
"npm version" = $(npm -v)
"APPVEYOR_REPO_COMMIT_MESSAGE" = $env:APPVEYOR_REPO_COMMIT_MESSAGE
"git latest tags" = "$(git tag --points-at HEAD)"
"appveyor_repo_tag" = $env:appveyor_repo_tag
} | Out-String | Write-Host;
# Check if we're building the latest tag, if so
# then we publish the binaries if tests pass.
- cmd: >
if ($env:appveyor_repo_tag -match "true" -and ("$(git tag --points-at HEAD)" -match $env:appveyor_repo_tag_name)) {
$env:publish_binary = $env:binary_builder;
}
if ($env:publish_binary -eq "true") {
"We're publishing a binary!" | Write-Host
} else {
"We're not publishing a binary" | Write-Host
}
true;
build_script:
- npm install
- npm run rebuild
test_script:
- cmd: >
if ($env:publish_binary -eq "true") {
npm run prebuild
}
true;
deploy: OFF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment