feat(src/knifehub.web/wwwroot/index.html): knifeHub-v1.4.9 -> KnifeHu… #22
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: KnifeHub Release | |
on: | |
push: | |
tags: | |
- 'KnifeHub-v*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
with: | |
# 为了让 git 有日志 (git log) 可寻,还得在检出的时候顺带把所有提交历史一并拉下来,指定 fetch-depth 就能做到 | |
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 6.0.100 | |
- name: Build | |
run: | | |
cd ./src/KnifeHub.Web | |
# win-x64 | |
dotnet publish -c Release -r win-x64 -p:PublishSingleFile=true --output ../../win-x64 --self-contained true | |
# win-x86 | |
dotnet publish -c Release -r win-x86 -p:PublishSingleFile=true --output ../../win-x86 --self-contained true | |
# linux-x64 | |
dotnet publish -c Release -r linux-x64 -p:PublishSingleFile=true --output ../../linux-x64 --self-contained true | |
# linux-arm | |
dotnet publish -c Release -r linux-arm -p:PublishSingleFile=true --output ../../linux-arm --self-contained true | |
# linux-arm64 | |
dotnet publish -c Release -r linux-arm64 -p:PublishSingleFile=true --output ../../linux-arm64 --self-contained true | |
# osx-x64 | |
dotnet publish -c Release -r osx-x64 -p:PublishSingleFile=true --output ../../osx-x64 --self-contained true | |
# osx.10.10-x64 | |
dotnet publish -c Release -r osx.10.10-x64 -p:PublishSingleFile=true --output ../../osx.10.10-x64 --self-contained true | |
- name: Zip the Build | |
run: | | |
zip -r KnifeHub-win-x64.zip ./win-x64/ | |
zip -r KnifeHub-win-x86.zip ./win-x86/ | |
zip -r KnifeHub-linux-x64.zip ./linux-x64/ | |
zip -r KnifeHub-linux-arm.zip ./linux-arm/ | |
zip -r KnifeHub-linux-arm64.zip ./linux-arm64/ | |
zip -r KnifeHub-osx-x64.zip ./osx-x64/ | |
zip -r KnifeHub-osx.10.10-x64.zip ./osx.10.10-x64/ | |
- name: Create temp-release-note.md | |
run: | | |
cp utils/generate-release-note.ps1 generate-release-note.ps1 | |
$env:GitProjectTagName="KnifeHub" | |
$env:GitProjectPath="src/KnifeHub.Web/*" | |
./generate-release-note.ps1 | |
shell: pwsh | |
- name: Create Release and Upload Release Asset | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
#tag_name: ${{ github.ref }} | |
#name: ${{ github.ref }} | |
# body: TODO New Release. | |
body_path: temp-release-note.md | |
draft: false | |
prerelease: false | |
files: | | |
KnifeHub-win-x64.zip | |
KnifeHub-win-x86.zip | |
KnifeHub-linux-x64.zip | |
KnifeHub-linux-arm.zip | |
KnifeHub-linux-arm64.zip | |
KnifeHub-osx-x64.zip | |
KnifeHub-osx.10.10-x64.zip |