Skip to content

Commit

Permalink
Enabled automated builds via AppVeyor
Browse files Browse the repository at this point in the history
  • Loading branch information
TomRichter committed Oct 24, 2018
1 parent 38b5ffe commit b81b757
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 1 deletion.
7 changes: 7 additions & 0 deletions PulsarPluginLoader.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PulsarPluginLoader", "Pulsa
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PulsarInjector", "PulsarInjector\PulsarInjector.csproj", "{F15E6EFA-3584-4503-98E0-17D3E87900F5}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6FA95747-6271-4991-96D0-73EDCA21D402}"
ProjectSection(SolutionItems) = preProject
appveyor.yml = appveyor.yml
LICENSE = LICENSE
README.md = README.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
3 changes: 2 additions & 1 deletion PulsarPluginLoader/PulsarPluginLoader.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>xcopy /Y "C:\Program Files (x86)\Steam\steamapps\common\PULSARLostColony\PULSAR_LostColony_Data\Managed\Assembly-CSharp.dll" "$(SolutionDir)lib\"</PreBuildEvent>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
</Project>
69 changes: 69 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
image: Visual Studio 2017
configuration: Release
platform: Any CPU

# Don't get the full project history to save time
shallow_clone: true

# Cache NuGet packages between builds to save time
cache:
- packages -> **\packages.config

# Auto-fill AssemblyInfo.cs
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
# Use tag name + build number as assembly version
# Assembly versions should be Major.Minor.Revision.Build
# ex: 1.1.12.255
assembly_version: '$(APPVEYOR_REPO_TAG_NAME).$(APPVEYOR_BUILD_NUMBER)'
assembly_file_version: '$(APPVEYOR_REPO_TAG_NAME).$(APPVEYOR_BUILD_NUMBER)'
assembly_informational_version: '$(APPVEYOR_REPO_TAG_NAME).$(APPVEYOR_BUILD_NUMBER)'

before_build:
# Manually set build version in a way that allows environment variables
- ps: Update-AppveyorBuild -Version "$env:APPVEYOR_REPO_TAG_NAME.$env:APPVEYOR_BUILD_NUMBER"

# Generate a VERSION file to include in artifacts
- ps: >-
$env:GIT_HASH = $env:APPVEYOR_REPO_COMMIT.Substring(0, 7)
"source: $env:APPVEYOR_REPO_PROVIDER $env:APPVEYOR_REPO_NAME" > VERSION
"commit: $env:APPVEYOR_REPO_BRANCH $env:GIT_HASH $env:APPVEYOR_REPO_COMMIT_TIMESTAMP" >> VERSION
"version: $env:APPVEYOR_BUILD_VERSION" >> VERSION
# Restore NuGet packages
- appveyor-retry nuget restore

build:
project: PulsarPluginLoader.sln
verbosity: minimal

after_build:
# Create two .ZIP artifacts:
# PulsarPluginBootstrapper-*.zip for end users to enable plugins (recommended download)
# PulsarPluginLoader.dll-*.zip for developers to reference during plugin creation
- cmd: >-
7z a PulsarPluginBootstrapper-%APPVEYOR_BUILD_VERSION%-%GIT_HASH%.zip README.md VERSION .\PulsarInjector\bin\Release\* -xr!*.pdb -xr!Assembly-CSharp.dll -mx=7
7z a PulsarPluginLoader.dll-%APPVEYOR_BUILD_VERSION%-%GIT_HASH%.zip README.md VERSION .\PulsarPluginLoader\bin\Release\PulsarPluginLoader.dll -mx=7
artifacts:
- path: PulsarPluginBootstrapper-$(APPVEYOR_BUILD_VERSION)-$(GIT_HASH).zip
name: PulsarPluginBootstrapper
- path: PulsarPluginLoader.dll-$(APPVEYOR_BUILD_VERSION)-$(GIT_HASH).zip
name: PulsarPluginLoader.dll

deploy:
- provider: GitHub
tag: $(APPVEYOR_REPO_TAG_NAME)
release: PPL v$(APPVEYOR_BUILD_VERSION)
description: ""
artifact: PulsarPluginBootstrapper,PulsarPluginLoader.dll
# Only upload TAGGED releases instead of every commit
on:
appveyor_repo_tag: true
auth_token:
secure: nJm0eDjrcfLhUCTsM7AiTp7GJi40mWXB8LPFRHek/uMqcvX2mdxxZ8cusuns5GAO
Binary file added lib/Assembly-CSharp.dll
Binary file not shown.

0 comments on commit b81b757

Please sign in to comment.