- version: 'BSIPA-{branch}-{build}'
- environment:
- bsipa_version: '3.12.21'
- gh_token:
- secure: E42gl/yepETuoLSwbJZ1GmEIPK6cCJu6zkd59NA21XiICtEV6COOLW7aehi1tcVU
- pull_requests:
- do_not_increment_build_number: true
- install:
- - git submodule update --init --recursive
- - nuget restore
- - ps: |
- if (-Not $env:APPVEYOR_PULL_REQUEST_TITLE)
- {
- git checkout $env:APPVEYOR_REPO_BRANCH -q
- choco install docfx -y
- }
- image: Visual Studio 2017
- configuration: Release
- platform: x64
- cache:
- - '%LocalAppData%\NuGet\v3-cache' # NuGet v3
- artifacts:
- - path: IPA/bin/$(configuration)
- name: BSIPA
- - path: BSIPA-ModList/bin/$(configuration)
- name: ModList
- build:
- verbosity: normal
- project: BSIPA.sln
- skip_tags: true
- deploy:
- - provider: GitHub
- release: BSIPA $(bsipa_version)-draft
- tag: $(bsipa_version)-d
- description: |
- **Build:** [$(bsipa_version)-$(APPVEYOR_BUILD_NUMBER)](https://ci.appveyor.com/project/nike4613/beatsaber-ipa-reloaded-9smsb/builds/$(APPVEYOR_BUILD_ID)) [$(configuration)|$(platform)]
- **Latest Commit:** $(APPVEYOR_REPO_COMMIT)
- - `$(APPVEYOR_REPO_COMMIT_MESSAGE)`
- - `$(APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED)`
- auth_token:
- secure: KhF3q/zWEFwrW0QeZLqE3NAkWR4u9iVhsmcyzXvwwJ28fUy+MzW4CWBx3RxNM60t
- artifact: /.*\.zip/
- draft: true
- force_update: true
- on:
- branch: master
- after_deploy:
- - ps: |
- if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE -And $env:APPVEYOR_REPO_BRANCH -eq 'master')
- {
- cd docs
-
- Add-Content link_branch.json "{`"_gitContribute`":{`"branch`":`"$env:APPVEYOR_REPO_COMMIT`"}}"
- & docfx metadata
- & docfx build --globalMetadataFiles all_globals.json,link_branch.json
- if ($lastexitcode -ne 0){
- throw [System.Exception] "docfx build failed with exit code $lastexitcode."
- }
-
- git config --global core.autocrlf true
- git config --global credential.helper store
- Add-Content "$HOME\.git-credentials" "https://$($env:gh_token):[email protected]`n"
- git config --global user.email $env:APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL
- git config --global user.name $env:APPVEYOR_REPO_COMMIT_AUTHOR
- git clone "https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded.git" -b gh-pages origin_site
- Move-Item origin_site/.git _site
- CD _site
- echo "Adding..."
- git add -A 2>&1
- echo "Commiting..."
- git commit -q -a -m "$env:APPVEYOR_REPO_COMMIT_MESSAGE -- Docs" 2>&1
- echo "Pushing..."
- git push -q origin gh-pages 2>&1
- }
|