-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathappveyor.yml
44 lines (44 loc) · 2.16 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
pull_requests:
do_not_increment_build_number: false
image: Visual Studio 2019
configuration:
- Release RedM
- Release FiveM
before_build:
- nuget restore
- cmd: if %APPVEYOR_REPO_TAG%==true (appveyor SetVariable -Name VERSION_NAME -Value %APPVEYOR_REPO_TAG_NAME%) else (appveyor SetVariable -Name VERSION_NAME -Value dev-%APPVEYOR_BUILD_VERSION%)
- cmd: if "%CONFIGURATION%"=="Release FiveM" (appveyor SetVariable -Name GAME -Value "FiveM") else if "%CONFIGURATION%"=="Release RedM" (appveyor SetVariable -Name GAME -Value "RedM")
build:
parallel: false
project: MenuAPI.sln
include_nuget_references: true
verbosity: minimal
after_build:
- cmd: copy "README.md" ".\MenuAPI\bin\README.md"
- cmd: 7z a MenuAPI-%VERSION_NAME%-%GAME%.zip -r ".\MenuAPI\bin\*"
- cmd: appveyor PushArtifact MenuAPI-%VERSION_NAME%-%GAME%.zip
deploy:
- provider: NuGet
api_key: $(NUGET_API_KEY)
skip_symbols: true
on:
APPVEYOR_REPO_TAG: true
- provider: GitHub
release: "[Release] MenuAPI $(VERSION_NAME)"
tag: $(VERSION_NAME)
artifact: MenuAPI-$(VERSION_NAME)-$(GAME).zip
draft: false
prerelease: false
auth_token: $(github_auth)
on:
APPVEYOR_REPO_TAG: true
description: "MenuAPI release, version $(VERSION_NAME). Download the **FiveM** or **RedM** versions below, by selecting the corresponding zip files.\n\nFor info check the [docs](https://docs.vespura.com/mapi) or checkout the recent commits on GitHub (the latter is your best bet if you want updated info about this version)."
before_deploy:
- ps: $env:NUGET_VERSION=(($env:VERSION_NAME).Substring(1))
- cmd: if "%CONFIGURATION%"=="Release FiveM" (cd MenuAPI && nuget pack MenuAPI.csproj -Properties Configuration="Release FiveM";Id="MenuAPI.FiveM" -Version "%NUGET_VERSION%" && appveyor PushArtifact MenuAPI.FiveM.%NUGET_VERSION%.nupkg && cd ..) else (cd MenuAPI && nuget pack MenuAPI.csproj -Properties Configuration="Release RedM";Id="MenuAPI.RedM" -Version "%NUGET_VERSION%" && appveyor PushArtifact MenuAPI.RedM.%NUGET_VERSION%.nupkg && cd ..)
after_deploy:
- cmd: appveyor/after_deploy.cmd
on_success:
- cmd: appveyor/on_success.cmd
on_failure:
- cmd: appveyor/on_failure.cmd