Build and Publish #13
Workflow file for this run
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
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 | |
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 | |
cd ../EndlessOnlinePatcher.Setup | |
dotnet build --configuration Release -o ../dist/setup --no-restore /p:EnableWindowsTargeting=true /p:Version=0.0.0.${{ github.run_number }} | |
- 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 | |
- name: Upload Setup | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Endless.Online.Patcher.Setup.0.0.0.${{ github.run_number }} | |
path: src/dist/setup/EndlessOnlinePatcherSetup.exe |