Skip to content

Deploy Simple Trader Demo #9

Deploy Simple Trader Demo

Deploy Simple Trader Demo #9

name: "Deploy Simple Trader Demo"
on:
push:
tags:
- "simple-trader/v*"
env:
PROJECT_PATH: SimpleTrader.WPF/SimpleTrader.WPF.csproj
jobs:
deploy:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Update Workload
run: dotnet workload update
- run: dotnet restore ${{ env.PROJECT_PATH }} --runtime win-x64
- run: dotnet build ${{ env.PROJECT_PATH }} -c Release --no-restore
- run: dotnet publish ${{ env.PROJECT_PATH }} -c Release --self-contained -r win-x64 --no-build
- uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
- uses: csexton/release-asset-action@v2
with:
github-token: ${{ secrets.MY_GITHUB_TOKEN }}
pattern: SimpleTrader.WPF/bin/Release/net8.0-windows/win-x64/publish/*.exe
release-url: ${{ steps.create_release.outputs.upload_url }}