-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto-builds use microsoft/setup-msbuild
- Loading branch information
1 parent
327ad33
commit f3e2017
Showing
1 changed file
with
16 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
name: "Build" | ||
on: | ||
push: | ||
tags: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
tagged-release: | ||
name: "Tagged Release" | ||
runs-on: "windows-latest" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: "Process Version from Tag" | ||
id: "semver" | ||
uses: "ncipollo/semantic-version-action@v1" | ||
|
||
- name: "Set Version with Build Number" | ||
id: "version" | ||
env: | ||
|
@@ -25,14 +25,14 @@ jobs: | |
run: | | ||
echo "::set-output name=number::${Env:BUILD_VERSION}.${Env:GITHUB_RUN_NUMBER}" | ||
echo "::set-output name=hash::$($Env:GITHUB_SHA.Substring(0, 7))" | ||
- name: "Update Version in AssemblyInfo.cs" | ||
env: | ||
BUILD_VERSION: "${{ steps.version.outputs.number }}" | ||
shell: "powershell" | ||
run: | | ||
.\.github\workflows\UpdateAssemblyInfo.ps1 | ||
- name: "Write Version to Text File" | ||
env: | ||
BUILD_VERSION: "${{ steps.version.outputs.number }}" | ||
|
@@ -42,10 +42,13 @@ jobs: | |
echo "version: ${Env:BUILD_VERSION}" >> "${Env:GITHUB_WORKSPACE}\VERSION.md" | ||
echo "commit: ${Env:GITHUB_SHA}" >> "${Env:GITHUB_WORKSPACE}\VERSION.md" | ||
echo "date: $((Get-Date -format r).ToString())" >> "${Env:GITHUB_WORKSPACE}\VERSION.md" | ||
- name: "Add MSBuild to PATH" | ||
uses: "microsoft/[email protected]" | ||
|
||
- name: "Install NuGet" | ||
uses: "nuget/setup-nuget@v1" | ||
|
||
- name: "Configure NuGet Sources" | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
@@ -66,12 +69,10 @@ jobs: | |
run: | | ||
nuget restore -LockedMode ${Env:GITHUB_WORKSPACE} | ||
- name: "Build with .NET Framework 3.5" | ||
shell: "powershell" | ||
- name: "Build with .NET Framework" | ||
run: | | ||
cd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\" | ||
.\MSBuild.exe "${Env:GITHUB_WORKSPACE}\" /p:RestoreLockedMode=true /p:Configuration=Release | ||
msbuild "${Env:GITHUB_WORKSPACE}" -p:RestoreLockedMode=true -p:Configuration=Release | ||
- name: "Package Artifacts" | ||
env: | ||
BUILD_VERSION: "${{ steps.version.outputs.number }}" | ||
|
@@ -80,7 +81,7 @@ jobs: | |
run: | | ||
7z a PulsarModLoaderInstaller-${Env:BUILD_VERSION}-${Env:COMMIT_HASH}.zip README.md VERSION.md .\lib\System.Windows.Forms.dll .\PulsarInjector\bin\Release\* -xr!'*.pdb' -mx=7 | ||
7z a PulsarModLoader.dll-${Env:BUILD_VERSION}-${Env:COMMIT_HASH}.zip README.md VERSION.md .\PulsarModLoader\bin\Release\PulsarModLoader.dll -mx=7 | ||
- name: "Publish to GitHub Releases" | ||
uses: "marvinpinto/action-automatic-releases@latest" | ||
with: | ||
|
@@ -89,7 +90,7 @@ jobs: | |
title: "PML v${{ steps.version.outputs.number }}" | ||
files: | | ||
*.zip | ||
- name: "NuGet Pack and Push" | ||
shell: "powershell" | ||
run: | | ||
|