ci: deployment config for beta+stable (#2976)

This commit is contained in:
tooomm 2017-12-29 00:33:16 +01:00 committed by Zach H
parent 3af2be4539
commit f0f73c8f77
3 changed files with 70 additions and 29 deletions

View file

@ -83,17 +83,35 @@ build_script:
test: off test: off
# Builds for pull requests skip the deployment step altogether
deploy: deploy:
provider: GitHub # Deploy configuration for "beta" releases
auth_token: - provider: GitHub
secure: p+7wPVry2XEa6TBm9XH8IaQZbBmXQ/J2ldbGmcIxUZD3NkkPrSRRlmE7Of1CBBIO auth_token:
description: "Dev build of Cockatrice" secure: p+7wPVry2XEa6TBm9XH8IaQZbBmXQ/J2ldbGmcIxUZD3NkkPrSRRlmE7Of1CBBIO
artifact: /.*\.exe/ release: "Cockatrice $APPVEYOR_REPO_TAG_NAME"
draft: false description: "Beta release of Cockatrice"
prerelease: true artifact: /.*\.exe/
force_update: true force_update: true
on: draft: false
appveyor_repo_tag: true prerelease: true
on:
APPVEYOR_REPO_TAG: true
APPVEYOR_REPO_TAG_NAME: /([0-9]|[1-9][0-9])(\.([0-9]|[1-9][0-9])){2}-beta(\.([2-9]|[1-9][0-9]))?$/ # regex to match semver naming convention for beta pre-releases
# Deploy configuration for "stable" releases
- provider: GitHub
auth_token:
secure: p+7wPVry2XEa6TBm9XH8IaQZbBmXQ/J2ldbGmcIxUZD3NkkPrSRRlmE7Of1CBBIO
artifact: /.*\.exe/
force_update: true
draft: false
prerelease: false
on:
APPVEYOR_REPO_TAG: true
APPVEYOR_REPO_TAG_NAME: /([0-9]|[1-9][0-9])(\.([0-9]|[1-9][0-9])){2}$/ # regex to match semver naming convention for stable full releases
# official validator for ".appveyor.yml" config file: https://ci.appveyor.com/tools/validate-yaml # official validator for ".appveyor.yml" config file: https://ci.appveyor.com/tools/validate-yaml
# appveyor config documentation: https://www.appveyor.com/docs/build-configuration/ # appveyor config documentation: https://www.appveyor.com/docs/build-configuration/

View file

@ -35,19 +35,41 @@ install: bash ./.travis/travis-dependencies.sh
script: bash ./.travis/travis-compile.sh script: bash ./.travis/travis-compile.sh
# Builds for pull requests skip the deployment step altogether
deploy: deploy:
provider: releases # Deploy configuration for "beta" releases
api_key: - provider: releases
secure: "mLMF41q7xgOR1sjczsilEy7HQis2PkZCzhfOGbn/8FoOQnmmPOZjrsdhn06ZSl3SFsbfCLuClDYXAbFscQmdgjcGN5AmHV+JYfW650QEuQa/f4/lQFsVRtEqUA1O3FQ0OuRxdpCfJubZBdFVH8SbZ93GLC5zXJbkWQNq+xCX1fU=" api_key:
file_glob: true secure: mLMF41q7xgOR1sjczsilEy7HQis2PkZCzhfOGbn/8FoOQnmmPOZjrsdhn06ZSl3SFsbfCLuClDYXAbFscQmdgjcGN5AmHV+JYfW650QEuQa/f4/lQFsVRtEqUA1O3FQ0OuRxdpCfJubZBdFVH8SbZ93GLC5zXJbkWQNq+xCX1fU=
file: "build/Cockatrice-*" skip_cleanup: true
prerelease: true name: "Cockatrice $TRAVIS_TAG"
skip_cleanup: true body: "Beta release of Cockatrice"
overwrite: true file_glob: true
on: file: "build/Cockatrice-*"
tags: true overwrite: true
repo: Cockatrice/Cockatrice draft: false
condition: $BUILDTYPE = Release prerelease: true
on:
tags: true
repo: Cockatrice/Cockatrice
condition: $BUILDTYPE = Release && $TRAVIS_TAG =~ ([0-9]|[1-9][0-9])(\.([0-9]|[1-9][0-9])){2}-beta(\.([2-9]|[1-9][0-9]))?$ # regex to match semver naming convention for beta pre-releases
# Deploy configuration for "stable" releases
- provider: releases
api_key:
secure: mLMF41q7xgOR1sjczsilEy7HQis2PkZCzhfOGbn/8FoOQnmmPOZjrsdhn06ZSl3SFsbfCLuClDYXAbFscQmdgjcGN5AmHV+JYfW650QEuQa/f4/lQFsVRtEqUA1O3FQ0OuRxdpCfJubZBdFVH8SbZ93GLC5zXJbkWQNq+xCX1fU=
skip_cleanup: true
file_glob: true
file: "build/Cockatrice-*"
overwrite: true
draft: false
prerelease: false
on:
tags: true
repo: Cockatrice/Cockatrice
condition: $BUILDTYPE = Release && $TRAVIS_TAG =~ ([0-9]|[1-9][0-9])(\.([0-9]|[1-9][0-9])){2}$ # regex to match semver naming convention for stable full releases
notifications: notifications:
webhooks: webhooks:
@ -57,5 +79,6 @@ notifications:
on_failure: change on_failure: change
on_start: never on_start: never
# official validator for ".travis.yml" config file: https://yaml.travis-ci.org # official validator for ".travis.yml" config file: https://yaml.travis-ci.org
# travis config documentation: https://docs.travis-ci.com/user/customizing-the-build # travis config documentation: https://docs.travis-ci.com/user/customizing-the-build

View file

@ -86,7 +86,7 @@ function(get_tag_name commit)
# Sanity checks: length # Sanity checks: length
list(LENGTH GIT_TAG_EXPLODED GIT_TAG_LISTCOUNT) list(LENGTH GIT_TAG_EXPLODED GIT_TAG_LISTCOUNT)
if(${GIT_TAG_LISTCOUNT} LESS 7 OR ${GIT_TAG_LISTCOUNT} GREATER 8) if(${GIT_TAG_LISTCOUNT} LESS 7 OR ${GIT_TAG_LISTCOUNT} GREATER 9)
message(WARNING "Invalid tag format, got ${GIT_TAG_LISTCOUNT} tokens") message(WARNING "Invalid tag format, got ${GIT_TAG_LISTCOUNT} tokens")
return() return()
endif() endif()