Files
monster_monitor_v2/.github/workflows/dotnet-desktop.yml
kislovdm 06f2ebb1ac
.NET Core Desktop / build (Debug) (push) Has been cancelled
maxconn
2026-04-27 01:02:02 +03:00

63 lines
1.8 KiB
YAML

name: .NET Core Desktop
on:
push:
tags:
- '*'
jobs:
build:
strategy:
matrix:
configuration: [Debug]
runs-on: windows-latest # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
steps:
- name: Checkout code.
uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: Setup Nuget
uses: Nuget/setup-nuget@v1.0.5
- name: Restore nuget packages
run: nuget restore src/MonsterMonitor.sln
- name: Build
run: msbuild src/MonsterMonitor.sln /p:Configuration=${{ matrix.configuration }} /p:OutputPath=/app
- name: Pack
run: cd /app && 7z a ./MonsterMonitor.zip /app/*
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: /app/MonsterMonitor.zip
asset_name: MonsterMonitor.zip
asset_content_type: application/zip