Skip to content

升级到 v2.1.10

升级到 v2.1.10 #40

Workflow file for this run

name: release-job
on:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore .\src
- name: Build
run: dotnet build .\src --no-restore -c release
- name: Publish
run: dotnet publish .\src -c Release -r win-x64 -p:PublishReadyToRun=true --self-contained false
- name: Get version
uses: olegtarasov/[email protected]
id: tagName
- name: Create zip
shell: pwsh
# 配置【编译后的文件地址】
run: Compress-Archive -Path ${{github.workspace}}\src\ComputerLock\bin\Release\net8.0-windows\win-x64\publish\* -DestinationPath ${{github.workspace}}\src\ComputerLock\bin\Release\ComputerLock_${{ steps.tagName.outputs.tag }}_win_x64.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\ComputerLock\bin\Release\ComputerLock_${{ steps.tagName.outputs.tag }}_win_x64.zip