mirror of
https://github.com/BlossomiShymae/Needlework.Net.git
synced 2025-12-06 10:10:48 +01:00
Update workflows
This commit is contained in:
35
.github/workflows/release.yml
vendored
35
.github/workflows/release.yml
vendored
@@ -1,9 +1,12 @@
|
|||||||
# .github/workflows/release.yml
|
# .github/workflows/release.yml
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
release:
|
||||||
branches:
|
types: [created]
|
||||||
- release
|
|
||||||
|
env:
|
||||||
|
PROJECT_NAME: Needlework.Net
|
||||||
|
ASSEMBLY_NAME: NeedleworkDotNet
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -20,25 +23,13 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: release
|
ref: release
|
||||||
- name: Build
|
- name: Build
|
||||||
run: dotnet build Needlework.Net -c Release
|
run: dotnet build ${{env.PROJECT_NAME}} -c Release
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: dotnet publish Needlework.Net -c Release -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:DebugType=None -p:DebugSymbols=false -o publish -r win-x64 --self-contained=false
|
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: Get Version
|
- name: Zip files
|
||||||
id: version
|
run: 7z a -tzip ${{env.ASSEMBLY_NAME}}-win-x64.zip ./Publish/* README.md LICENSE
|
||||||
shell: powershell
|
- name: Upload to release
|
||||||
run: |
|
|
||||||
$xml=[xml](Get-Content .\Needlework.Net\Needlework.Net.csproj)
|
|
||||||
$ver=($xml.Project.PropertyGroup).AssemblyVersion
|
|
||||||
$ver="VERSION=$ver"
|
|
||||||
$ver=$ver -replace '\s',''
|
|
||||||
echo $ver >> $env:GITHUB_OUTPUT
|
|
||||||
- name: Zip Files
|
|
||||||
run: 7z a -tzip NeedleworkDotNet-win-x64.zip ./Publish/* README.md LICENSE
|
|
||||||
- name: Release
|
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: ${{startsWith(github.ref, 'refs/tags/') }}
|
||||||
with:
|
with:
|
||||||
name: "Needlework.Net v${{ steps.version.outputs.VERSION }}"
|
files: ${{env.ASSEMBLY_NAME}}-win-x64.zip
|
||||||
prerelease: false
|
|
||||||
tag_name: "${{ steps.version.outputs.VERSION }}"
|
|
||||||
files: |
|
|
||||||
NeedleworkDotNet-win-x64.zip
|
|
||||||
Reference in New Issue
Block a user