SnipeitPS/appveyor.yml

105 lines
3 KiB
YAML
Raw Normal View History

2017-11-16 13:11:45 +00:00
############################################################
#
# See http://www.appveyor.com/docs/appveyor-yml for many more options
#
# Credit for a lot of this file goes to RamblingCookieMonster:
# https://github.com/RamblingCookieMonster/PSSQLite/blob/master/appveyor.yml
#
############################################################
2021-06-15 14:09:59 +03:00
# powershell core and 5.1
image:
- Visual Studio 2017
- Visual Studio 2019
2017-11-16 13:11:45 +00:00
2017-11-18 21:41:35 +00:00
environment:
PSGalleryAPIKey:
secure: UdM6qhf5B0G8liHhUrwWERCZr44iSqmg4jUq0lwlTjZs4KyeoiwnBzdej0phqIAm
2021-06-15 14:09:59 +03:00
PShell: '5'
2017-11-16 13:11:45 +00:00
2021-06-14 10:48:16 +03:00
version: 1.7.{build}
2017-11-16 13:11:45 +00:00
# Don't rebuild when I tag a release on GitHub
skip_tags: true
# Ignore testing a commit if only the readme changed
# Or if I include "skip-tests" in the commit message
skip_commits:
message: /skip\-tests/
files:
- .github/
- .vscode/
- assets/
- Tools/
- README.md
- .gitattributes
- .gitignore
# PRs, by definition, don't change anything and therefore should not increment the version
# To be fair, this is not important, and is really just AppVeyor enabling my pedantry
pull_requests:
do_not_increment_build_number: true
install:
- ps: |
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force | Out-Null
Install-Module InvokeBuild -Scope CurrentUser -Force
Install-Module BuildHelpers -Scope CurrentUser -Force
2017-11-18 19:55:09 +00:00
Install-Module platyPS -Scope CurrentUser -Force
2017-11-16 13:11:45 +00:00
Install-Module Pester -Scope CurrentUser -Force
Install-Module PSScriptAnalyzer -Scope CurrentUser -Force
$env:releasePath = "$($pwd.Path)\Release"
before_build:
- ps: Invoke-Build -Task ShowDebug
build_script:
- ps: Invoke-Build -Task Build
test_script:
- ps: Invoke-Build -Task Test
2017-11-18 21:41:35 +00:00
before_deploy:
- ps: Invoke-Build -Task Deploy
2021-06-15 14:09:59 +03:00
#Build with powershell core
for:
-
matrix:
only:
- image: Visual Studio 2019
2021-06-15 14:23:48 +03:00
environment:
- PShell: '7'
install:
- pwsh: |
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force | Out-Null
Install-Module InvokeBuild -Scope CurrentUser -Force
Install-Module BuildHelpers -Scope CurrentUser -Force
Install-Module platyPS -Scope CurrentUser -Force
Install-Module Pester -Scope CurrentUser -Force
Install-Module PSScriptAnalyzer -Scope CurrentUser -Force
$env:releasePath = "$($pwd.Path)\Release"
before_build:
- pwsh: Invoke-Build -Task ShowDebug
build_script:
- pwsh: Invoke-Build -Task Build
test_script:
- pwsh: Invoke-Build -Task Test
before_deploy:
- pwsh: Invoke-Build -Task Deploy
2021-06-15 14:09:59 +03:00
2017-11-18 21:41:35 +00:00
deploy:
provider: GitHub
release: v$(appveyor_build_version)
description: ''
auth_token:
secure: m72Ke3nJcSxZkc36UwRIw+q0NtNvERfQYHZUBNDvLP/kjW+mWmVueR6tmgBujyBM
draft: false
prerelease: false
on:
branch: master # release from master branch only
2021-05-17 15:46:06 +03:00
appveyor_repo_tag: false # deploy on tag push only