Skip to content

Trying to fix publish warning and error #3

Trying to fix publish warning and error

Trying to fix publish warning and error #3

Workflow file for this run

name: Publish Binary
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
runs-on: windows-latest
env:
DOTNET_NOLOGO: true
steps:
- name: 📥 Checkout source
uses: actions/checkout@v4
- name: 🧰 Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.300'
- name: 🏗️ Restore dependencies
run: dotnet restore
- name: 🛠️ Build
run: dotnet build -c Release --no-restore
- name: 📦 Publish (single-file, framework-dependent)
run: |
$version = "${{ github.ref_name }}".TrimStart("v")
$project = Get-ChildItem -Path . -Filter *.csproj -Recurse | Select-Object -First 1
dotnet publish $project.FullName -c Release -r win-x64 -p:PublishSingleFile=true --self-contained false -p:Version=$version
- name: 📤 Upload release assets
uses: softprops/action-gh-release@v2
with:
name: Release ${{ github.ref_name }}
files: ./publish/*.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}