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.

72 lines
2.5 KiB

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