Mirror/appveyor.yml
Paul Pacheco 0d1d7b5a1c
fix: set version number (#1338)
* dry run semantic release

* fix: setting version number

* fix syntax error

* Display the version
2019-12-21 13:54:18 -06:00

59 lines
1.7 KiB
YAML

version: '{branch}-{build}'
#init:
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
#on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
install:
- choco install unitypackager
- choco install docfx
- choco install lftp
- npm install -g semantic-release@15 @semantic-release/exec
#build:
# project: Mirror/Networking.sln
# verbosity: minimal
# Do not build on tags (GitHub only)
skip_tags: true
before_build:
- ps: |
semantic-release --dry-run | %{
echo $_
$fields = -split $_;
if ($fields[0] -eq "#" -or $fields[0] -eq "##") {
echo "Mirror version " $fields[1]
echo $fields[1] > Assets/Mirror/version.txt
}
}
build_script:
- docfx metadata doc\docfx.json
- docfx build doc\docfx.json
after_build:
- RMDIR /Q /S Assets\Mirror\Tests
- del /F /Q Assets\Mirror\Tests.meta
- UnityPackager pack Mirror.unitypackage Assets/Mirror Assets/Mirror Assets/ScriptTemplates Assets/ScriptTemplates LICENSE Assets/Mirror/LICENSE
artifacts:
- path: Mirror.unitypackage
- path: Assets
name: Mirror
- path: Assets
name: ScriptTemplates
image: Visual Studio 2017
environment:
LFTP_PASSWORD:
secure: sH23IC4a98S5uTtgYNHNvg==
deploy_script:
- semantic-release
- IF "%APPVEYOR_REPO_BRANCH%"=="master" ( lftp -e 'set ftp:ssl-allow no ; mirror -R -c -e -p doc/_site public_html/docs; chmod -R a+X public_html/docs ; ls -l public_html/docs/ ; ls -l public_html/docs/styles/ ; bye' -u mirreofx --env-password ftp://mirror-networking.com 2>&1 )