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.

73 lines
2.6 KiB

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