Skip to content

Update build.yml

Update build.yml #56

Workflow file for this run

name: Build
permissions:
contents: write
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
path: .
- name: Install .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Build win-x64
run: Build_win-x64.bat
shell: cmd
- name: Upload win-x64
uses: actions/upload-artifact@v4
with:
name: Drill_win-x64
path: bin/Drill_win-x64.exe
if-no-files-found: error
- name: Create a Release
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: ncipollo/release-action@v1
with:
artifacts: bin/Drill_win-x64.exe
artifactErrorsFailBuild: true
draft: false
prerelease: true
makeLatest: true
name: "Latest Release"
tag: latest
updateOnlyUnreleased: true
allowUpdates: true
#- name: Build MAUI
# run: dotnet publish --maxCpuCount -f net8.0-windows10.0.19041.0 -c Release -p:RuntimeIdentifierOverride=win10-x64 -p:WindowsPackageType=None .\Drill\Drill.csproj
#- name: Upload Win
# uses: actions/upload-artifact@v4
# with:
# name: Drill_win10-x64
# path: Drill\bin\Release\net8.0-windows10.0.19041.0\win10-x64\publish
# if-no-files-found: error
#- name: Build Mac
# run: dotnet publish --maxCpuCount -f net8.0-maccatalyst -c Release -p:RuntimeIdentifierOverride=maccatalyst-arm64 -p:WindowsPackageType=None .\Drill\Drill.csproj
#- name: Upload Mac
# uses: actions/upload-artifact@v4
# with:
# name: Drill_win10-x64
# path: Drill\bin\Release\net8.0-maccatalyst\maccatalyst-arm64\publish
# if-no-files-found: error