You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
2.2 KiB

5 years ago
  1. version: 'BSIPA-{branch}-{build}'
  2. environment:
  3. bsipa_version: '3.12.21'
  4. pull_requests:
  5. do_not_increment_build_number: true
  6. install:
  7. - git submodule update --init --recursive
  8. - nuget restore
  9. - ps: |
  10. if (-Not $env:APPVEYOR_PULL_REQUEST_TITLE)
  11. {
  12. git checkout $env:APPVEYOR_REPO_BRANCH -q
  13. choco install docfx -y
  14. }
  15. image: Visual Studio 2017
  16. configuration: Release
  17. platform: x64
  18. cache:
  19. - '%LocalAppData%\NuGet\v3-cache' # NuGet v3
  20. artifacts:
  21. - path: IPA/bin/$(configuration)
  22. name: BSIPA
  23. - path: BSIPA-ModList/bin/$(configuration)
  24. name: ModList
  25. build:
  26. verbosity: normal
  27. project: BSIPA.sln
  28. skip_tags: true
  29. deploy:
  30. - provider: GitHub
  31. release: BSIPA $(bsipa_version)-draft
  32. tag: $(bsipa_version)-d
  33. description: |
  34. **Build:** [$(bsipa_version)-$(APPVEYOR_BUILD_NUMBER)](https://ci.appveyor.com/project/nike4613/beatsaber-ipa-reloaded-9smsb/builds/$(APPVEYOR_BUILD_ID)) [$(configuration)|$(platform)]
  35. **Latest Commit:** $(APPVEYOR_REPO_COMMIT)
  36. - `$(APPVEYOR_REPO_COMMIT_MESSAGE)`
  37. - `$(APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED)`
  38. auth_token:
  39. secure: KhF3q/zWEFwrW0QeZLqE3NAkWR4u9iVhsmcyzXvwwJ28fUy+MzW4CWBx3RxNM60t
  40. artifact: /.*\.zip/
  41. draft: true
  42. force_update: true
  43. on:
  44. branch: master
  45. after_deploy:
  46. - ps: |
  47. if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE -And $env:APPVEYOR_REPO_BRANCH -eq 'master')
  48. {
  49. cd IPA.Loader/doc
  50. & docfx docfx.json
  51. if ($lastexitcode -ne 0){
  52. throw [System.Exception] "docfx build failed with exit code $lastexitcode."
  53. }
  54. git config --global credential.helper store
  55. #Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:access_token):[email protected]`n"
  56. git config --global user.email $env:APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL
  57. git config --global user.name $env:APPVEYOR_REPO_COMMIT_AUTHOR
  58. git clone "https://github.com/$env:APPVEYOR_REPO_NAME.git" -b gh-pages origin_site -q
  59. Copy-Item origin_site/.git _site -recurse
  60. CD _site
  61. git add -A 2>&1
  62. git commit -m "$env:APPVEYOR_REPO_COMMIT_MESSAGE -- Docs" -q
  63. git push origin gh-pages -q
  64. }