Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build Windows Binary

on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
workflow_dispatch:

jobs:
build:
runs-on: windows-latest
permissions:
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Publish
run: dotnet publish --configuration Release --no-build --runtime win-x64 --self-contained --output ./publish

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: FolderSnippets-Windows
path: ./publish/FolderSnippets.exe
retention-days: 1
overwrite: true
Comment on lines +37 to +40

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Enforce single artifact across workflow runs

The retention-days: 1 and overwrite: true settings here only affect each artifact’s lifetime and (at most) duplicate uploads within the same workflow run; they do not delete artifacts from previous runs. That means if two pushes happen in a day, both runs will still leave artifacts for up to 24 hours, so the repo can have multiple “most recent” artifacts at once, which doesn’t satisfy the “only most recent entry” requirement. Consider adding a step that deletes prior artifacts via the GitHub API before uploading the new one if you truly want only a single artifact to exist at any time.

Useful? React with 👍 / 👎.

Loading