-
Notifications
You must be signed in to change notification settings - Fork 21
/
appveyor.yml
43 lines (43 loc) · 4.65 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
pull_requests:
do_not_increment_build_number: false
image: Visual Studio 2019
configuration:
- Release
before_build:
- 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: cd RedMenu
- cmd: mkdir "RedMenu"
- nuget restore
- cmd: cd ..
build:
parallel: true
project: RedMenu\RedMenu.sln
include_nuget_references: true
verbosity: minimal
after_build:
- cmd: copy "README.md" "RedMenu\RedMenu\README.md"
- cmd: copy "config.cfg" "RedMenu\RedMenu\config.cfg"
- cmd: copy "fxmanifest.lua" "RedMenu\RedMenu\fxmanifest.lua"
- cmd: copy ".\RedMenu\RedMenuClient\bin\Release\net452\*" "RedMenu\RedMenu\"
- cmd: copy ".\RedMenu\RedMenuServer\bin\Release\net452\*" "RedMenu\RedMenu\"
- cmd: cd RedMenu
- cmd: 7z a "..\RedMenu-%VERSION_NAME%.zip" -r "RedMenu\*"
- cmd: cd .. && appveyor PushArtifact RedMenu-%VERSION_NAME%.zip
deploy:
- provider: GitHub
release: "RedMenu $(VERSION_NAME)"
tag: $(VERSION_NAME)
artifact: RedMenu-$(VERSION_NAME).zip
draft: true
prerelease: true
auth_token: $(github_auth)
on:
APPVEYOR_REPO_TAG: true
description: "RedMenu release, version $(VERSION_NAME). Download this release by selecting the corresponding zip files below (the release zip, not the source files). All builds are considered beta builds for now and may not even work at all, use at your own risk."
before_deploy:
- cmd: curl -F "file=@RedMenu-%VERSION_NAME%.zip" %WEBHOOK_URL%
- cmd: curl -H "Content-Type:application/json" -X POST -d "{\"content\":\"^<^@^&540562517806809109^>\",\"embeds\":[{\"title\":\"%APPVEYOR_PROJECT_NAME% (%VERSION_NAME%)\",\"description\":\"New version of **%APPVEYOR_PROJECT_NAME%** (%VERSION_NAME%) is available! Download it by using the files in this chanel or by going to the GitHub Tag link!\",\"color\":3048181,\"author\":{\"name\":\"Release build triggered by %APPVEYOR_ACCOUNT_NAME%\",\"url\":\"https://github.com/%APPVEYOR_ACCOUNT_NAME%/\"},\"fields\":[{\"name\":\"AppVeyor Build\",\"value\":\"[Here](%APPVEYOR_URL%/project/%APPVEYOR_ACCOUNT_NAME%/%APPVEYOR_PROJECT_SLUG%/builds/%APPVEYOR_BUILD_ID%)\"},{\"name\":\"GitHub Commit (%APPVEYOR_REPO_COMMIT%)\",\"value\":\"[%APPVEYOR_REPO_COMMIT%](https://github.com/%APPVEYOR_ACCOUNT_NAME%/%APPVEYOR_PROJECT_NAME%/commit/%APPVEYOR_REPO_COMMIT%) - %APPVEYOR_REPO_COMMIT_MESSAGE%%APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED%\"},{\"name\":\"GitHub Branch\",\"value\":\"[%APPVEYOR_REPO_BRANCH%](https://github.com/%APPVEYOR_ACCOUNT_NAME%/%APPVEYOR_PROJECT_NAME%/tree/%APPVEYOR_REPO_BRANCH%)\"},{\"name\":\"GitHub Tag\",\"value\":\"[%APPVEYOR_REPO_TAG_NAME%](https://github.com/%APPVEYOR_ACCOUNT_NAME%/%APPVEYOR_PROJECT_NAME%/releases/tag/%APPVEYOR_REPO_TAG_NAME%)\"}]}]}" %WEBHOOK_URL%
on_success:
- cmd: if %APPVEYOR_REPO_TAG%==false curl -H "Content-Type:application/json" -X POST -d "{\"embeds\":[{\"title\":\"%APPVEYOR_PROJECT_NAME% (%VERSION_NAME%)\",\"description\":\"Build passed!\",\"color\":4502298,\"author\":{\"name\":\"Build triggered by %APPVEYOR_ACCOUNT_NAME%\",\"url\":\"https://github.com/%APPVEYOR_ACCOUNT_NAME%/\"},\"fields\":[{\"name\":\"AppVeyor Build\",\"value\":\"[Here](%APPVEYOR_URL%/project/%APPVEYOR_ACCOUNT_NAME%/%APPVEYOR_PROJECT_SLUG%/builds/%APPVEYOR_BUILD_ID%)\"},{\"name\":\"GitHub Commit (%APPVEYOR_REPO_COMMIT%)\",\"value\":\"[%APPVEYOR_REPO_COMMIT%](https://github.com/%APPVEYOR_ACCOUNT_NAME%/%APPVEYOR_PROJECT_NAME%/commit/%APPVEYOR_REPO_COMMIT%) - %APPVEYOR_REPO_COMMIT_MESSAGE%%APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED%\"},{\"name\":\"GitHub Branch\",\"value\":\"[%APPVEYOR_REPO_BRANCH%](https://github.com/%APPVEYOR_ACCOUNT_NAME%/%APPVEYOR_PROJECT_NAME%/tree/%APPVEYOR_REPO_BRANCH%)\"}]}]}" %WEBHOOK_URL%
on_failure:
- cmd: curl -H "Content-Type:application/json" -X POST -d "{\"embeds\":[{\"title\":\"%APPVEYOR_PROJECT_NAME% (%VERSION_NAME%)\",\"description\":\"Build FAILED! Ouch.\",\"color\":13632027,\"author\":{\"name\":\"Build triggered by %APPVEYOR_ACCOUNT_NAME%\",\"url\":\"https://github.com/%APPVEYOR_ACCOUNT_NAME%/\"},\"fields\":[{\"name\":\"AppVeyor Build\",\"value\":\"[Here](%APPVEYOR_URL%/project/%APPVEYOR_ACCOUNT_NAME%/%APPVEYOR_PROJECT_SLUG%/builds/%APPVEYOR_BUILD_ID%)\"},{\"name\":\"GitHub Commit (%APPVEYOR_REPO_COMMIT%)\",\"value\":\"[%APPVEYOR_REPO_COMMIT%](https://github.com/%APPVEYOR_ACCOUNT_NAME%/%APPVEYOR_PROJECT_NAME%/commit/%APPVEYOR_REPO_COMMIT%) - %APPVEYOR_REPO_COMMIT_MESSAGE%%APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED%\"},{\"name\":\"GitHub Branch\",\"value\":\"[%APPVEYOR_REPO_BRANCH%](https://github.com/%APPVEYOR_ACCOUNT_NAME%/%APPVEYOR_PROJECT_NAME%/tree/%APPVEYOR_REPO_BRANCH%)\"}]}]}" %WEBHOOK_URL%