Github Actions
This commit is contained in:
1 parent
0b46f262e9
commit
97641b479c
1 file changed
+44
@@ -0,0 +1,44 @@
|
|||||||
|
name: Build and Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-release:
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup .NET
|
||||||
|
uses: actions/setup-dotnet@v4
|
||||||
|
with:
|
||||||
|
dotnet-version: '10.0.x'
|
||||||
|
|
||||||
|
- name: Build with dotnet
|
||||||
|
run: dotnet build --configuration Release
|
||||||
|
|
||||||
|
# build for all patforms
|
||||||
|
- name: Publish Artifacts x64
|
||||||
|
run: dotnet publish -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/x64
|
||||||
|
|
||||||
|
- name: Publish Artifacts x86
|
||||||
|
run: dotnet publish -c Release -r win-x86 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/x86
|
||||||
|
|
||||||
|
- name: Publish Artifacts arm
|
||||||
|
run: dotnet publish -c Release -r win-arm64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/arm
|
||||||
|
|
||||||
|
# Step 6: Create a new GitHub Release and upload the ZIP file
|
||||||
|
- name: Create GitHub Release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
tag_name: v1.0.${{ github.run_number }} # Automatically increments the version number
|
||||||
|
name: Release v1.0.${{ github.run_number }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
files: ./publish/**/*.exe
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Provided automatically by GitHub
|
||||||
Reference in new issue
Block a user