Skip to content

Build and Publish

Build and Publish #20

Workflow file for this run

name: Build
run-name: Build and Publish
on:
push:
branches:
- main
- 'feature/**'
jobs:
build:
runs-on: ubuntu-latest
name: Build
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.x
- name: Install dependencies
run: dotnet restore src/EndlessOnlinePatcher.Desktop/EndlessOnlinePatcher.Desktop.csproj /p:EnableWindowsTargeting=true
- name: Build & Publish Version ${{ github.run_number }}
run: |
cd src/EndlessOnlinePatcher.Desktop
dotnet build --configuration Release --no-restore /p:EnableWindowsTargeting=true /p:Version=0.0.0.${{ github.run_number }}
dotnet publish EndlessOnlinePatcher.Desktop.csproj --no-build -c Release -o ../dist/self-contained -r win-x64 --self-contained true /p:EnableWindowsTargeting=true /p:PublishSingleFile=true -f net7.0
dotnet publish EndlessOnlinePatcher.Desktop.csproj --no-build -c Release -o ../dist/framework-dependant -r win-x64 --self-contained false /p:EnableWindowsTargeting=true /p:PublishSingleFile=true -f net7.0
- name: Upload Self Contained
uses: actions/upload-artifact@v3
with:
name: Endless.Online.Patcher.Desktop.Self.Contained.0.0.0.${{ github.run_number }}
path: src/dist/self-contained/EndlessOnlinePatcher.Desktop.exe
- name: Upload Framework Dependant
uses: actions/upload-artifact@v3
with:
name: Endless.Online.Patcher.Desktop.Framework.Dependant.0.0.0.${{ github.run_number }}
path: src/dist/framework-dependant/EndlessOnlinePatcher.Desktop.exe