mirror of
https://github.com/BlossomiShymae/Needlework.Net.git
synced 2025-12-06 18:20:47 +01:00
35 lines
1.2 KiB
YAML
35 lines
1.2 KiB
YAML
# .github/workflows/release.yml
|
|
|
|
on:
|
|
release:
|
|
types: [created]
|
|
|
|
env:
|
|
PROJECT_NAME: Needlework.Net
|
|
ASSEMBLY_NAME: NeedleworkDotNet
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: windows-latest # For a list of available runner types, refer to
|
|
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
|
|
steps:
|
|
- name: Install .NET Core
|
|
uses: actions/setup-dotnet@v3
|
|
with:
|
|
dotnet-version: 8.0.x
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
ref: release
|
|
- name: Build
|
|
run: dotnet build ${{env.PROJECT_NAME}} -c Release
|
|
- name: Publish
|
|
run: dotnet publish ${{env.PROJECT_NAME}} -c Release -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:DebugType=None -p:DebugSymbols=false -o publish -r win-x64 --self-contained=false
|
|
- name: Zip files
|
|
run: 7z a -tzip ${{env.ASSEMBLY_NAME}}-win-x64.zip ./Publish/* README.md LICENSE
|
|
- name: Upload to release
|
|
uses: softprops/action-gh-release@v1
|
|
if: ${{startsWith(github.ref, 'refs/tags/') }}
|
|
with:
|
|
files: ${{env.ASSEMBLY_NAME}}-win-x64.zip |