Skip to content

升级到 v2.2.6

升级到 v2.2.6 #35

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Nuget
uses: NuGet/setup-nuget@v1.2.0
- name: Restore nuget packages
run: nuget restore .\src\JiuLing.AutoUpgrade.sln
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
- name: Build core app
run: msbuild .\src\JiuLing.AutoUpgrade\JiuLing.AutoUpgrade.csproj /P:Configuration=Release
- name: Waiting for file copy
run: Start-Sleep -s 30
shell: powershell
- name: Setup .NET 8
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore .\src\JiuLing.AutoUpgrade.sln
- name: Build shell app
run: dotnet build .\src\JiuLing.AutoUpgrade.Shell\JiuLing.AutoUpgrade.Shell.csproj --no-restore -c release
- name: Get version
uses: olegtarasov/get-tag@v2.1
id: tagName
- name: Create zip
shell: pwsh
# 配置【编译后的文件地址】
run: Compress-Archive -Path ${{github.workspace}}\src\JiuLing.AutoUpgrade.Shell\bin\Release\* -DestinationPath ${{github.workspace}}\src\JiuLing.AutoUpgrade.Shell\bin\Release\JiuLing.AutoUpgrade.Shell_${{ steps.tagName.outputs.tag }}.zip
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
# 配置【README地址】
body_path: ${{github.workspace}}\CHANGELOG.md
# 配置【zip文件地址】
files: ${{github.workspace}}\src\JiuLing.AutoUpgrade.Shell\bin\Release\JiuLing.AutoUpgrade.Shell_${{ steps.tagName.outputs.tag }}.zip
#配置发布NuGet
- name: Publish
uses: brandedoutcast/publish-nuget@v2.5.5
with:
PROJECT_FILE_PATH: src/JiuLing.AutoUpgrade.Shell/JiuLing.AutoUpgrade.Shell.csproj
PACKAGE_NAME: JiuLing.AutoUpgrade
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
TAG_COMMIT: false