VRCMelonAssistant/.github/workflows/dotnet.yml

44 lines
1.4 KiB
YAML
Raw Normal View History

name: .NET Build
2021-03-28 00:24:05 +13:00
on:
push:
pull_request:
branches:
- master
jobs:
2020-10-21 08:50:00 +13:00
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup msbuild
uses: microsoft/setup-msbuild@v1.0.2
- name: Install dependencies
run: msbuild -t:restore
- name: Build project
run: msbuild VRCMelonAssistant/VRCMelonAssistant.csproj /t:Build /p:Configuration=Release
2020-10-21 08:50:00 +13:00
- name: Cleanup release
shell: bash
run: |
find "VRCMelonAssistant/bin/Release" -type f ! -name "VRCMelonAssistant.exe" -delete
cp "LICENSE" "VRCMelonAssistant/bin/Release/LICENSE.VRCMelonAssistant.txt"
2020-10-21 08:50:00 +13:00
- name: Upload Build
if: startsWith(github.ref, 'refs/tags/') == false
uses: actions/upload-artifact@v2
with:
name: VRCMelonAssistant-${{ github.sha }}
path: ./VRCMelonAssistant/bin/Release/
2020-10-21 09:24:53 +13:00
- name: Extract Release Version
if: startsWith(github.ref, 'refs/tags/')
id: get_version
shell: bash
run: echo ::set-output name=version::${GITHUB_REF#refs/tags/v}
2020-10-21 08:50:00 +13:00
- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: VRChat Melon Assistant v${{ steps.get_version.outputs.version }}
files: ./VRCMelonAssistant/bin/Release/VRCMelonAssistant.exe