mirror of
https://github.com/ergosteur/ssh-protocol-handler-win.git
synced 2026-04-19 13:39:33 -04:00
Compare commits
1 Commits
4a7c5330a9
...
v0.1.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf7ead5f56 |
36
.github/workflows/build.yml
vendored
36
.github/workflows/build.yml
vendored
@@ -1,14 +1,16 @@
|
|||||||
# .github/workflows/build.yml
|
name: Build and Release
|
||||||
name: Build Windows Executable
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ] # Runs whenever you push to the main branch
|
tags:
|
||||||
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
|
- 'v*' # Triggers only on tags starting with 'v' (e.g., v1.0.0)
|
||||||
|
workflow_dispatch: # Allows manual runs from the Actions tab
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: windows-latest # Use a Windows runner for the build
|
runs-on: windows-latest
|
||||||
|
permissions:
|
||||||
|
contents: write # Essential for creating the release and uploading assets
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@@ -17,19 +19,31 @@ jobs:
|
|||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
uses: actions/setup-dotnet@v4
|
uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: 8.0.x # Use a recent .NET version
|
dotnet-version: 8.0.x
|
||||||
|
|
||||||
- name: Restore dependencies
|
- name: Restore dependencies
|
||||||
run: dotnet restore
|
run: dotnet restore
|
||||||
|
|
||||||
- name: Build and publish self-contained executable
|
- name: Build and publish self-contained executable
|
||||||
run: > # This command builds a single .exe with the runtime included
|
run: >
|
||||||
dotnet publish --configuration Release --runtime win-x64
|
dotnet publish --configuration Release --runtime win-x64
|
||||||
--self-contained true /p:PublishSingleFile=true
|
--self-contained true /p:PublishSingleFile=true
|
||||||
/p:IncludeNativeLibrariesForSelfExtract=true
|
/p:IncludeNativeLibrariesForSelfExtract=true
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Create GitHub Release
|
||||||
uses: actions/upload-artifact@v4
|
uses: softprops/action-gh-release@v2
|
||||||
|
if: startsWith(github.ref, 'refs/tags/') # Only runs if the trigger was a tag
|
||||||
with:
|
with:
|
||||||
name: SshHandler-Windows-Executable # The name of the downloadable file
|
files: ${{ github.workspace }}/SshHandler/bin/Release/net8.0-windows/win-x64/publish/SshHandler.exe
|
||||||
path: ${{ github.workspace }}/SshHandler/bin/Release/net8.0-windows/win-x64/publish/SshHandler.exe # Adjust the path if your project name is different
|
generate_release_notes: true
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Upload artifact (Manual Run fallback)
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
if: always() # Still uploads the artifact even if it wasn't a tag run
|
||||||
|
with:
|
||||||
|
name: SshHandler-Windows-Executable
|
||||||
|
path: ${{ github.workspace }}/SshHandler/bin/Release/net8.0-windows/win-x64/publish/SshHandler.exe
|
||||||
|
|||||||
Reference in New Issue
Block a user