Skip to content

feat: 更多无效字符过滤 #14

feat: 更多无效字符过滤

feat: 更多无效字符过滤 #14

Workflow file for this run

name: .NET Build and Release
on:
push:
branches: [ "main" ]
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build Windows x64
run: dotnet publish FontGeneratorCLI/FontGeneratorCLI.csproj -c Release -r win-x64 -o ./publish/win-x64
- name: Build Linux x64
run: dotnet publish FontGeneratorCLI/FontGeneratorCLI.csproj -c Release -r linux-x64 -o ./publish/linux-x64
- name: Build Linux ARM64
run: dotnet publish FontGeneratorCLI/FontGeneratorCLI.csproj -c Release -r linux-arm64 -o ./publish/linux-arm64
- name: Generate Tag Name
id: tag_name
run: |
DATE=$(date +'%Y.%m.%d')
COUNT=$(git tag -l "v$DATE*" | wc -l)
if [ $COUNT -eq 0 ]; then
TAG="v$DATE"
else
TAG="v$DATE.$COUNT"
fi
echo "TAG_NAME=$TAG" >> $GITHUB_ENV
echo "final_tag=$TAG" >> $GITHUB_OUTPUT
- name: Zip Artifacts
run: |
zip -j FontGeneratorCLI_win-x64.zip ./publish/win-x64/*
zip -j FontGeneratorCLI_linux-x64.zip ./publish/linux-x64/*
zip -j FontGeneratorCLI_linux-arm64.zip ./publish/linux-arm64/*
- name: Create Tag
run: |
git tag ${{ env.TAG_NAME }}
git push origin ${{ env.TAG_NAME }}
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.TAG_NAME }}
name: FontGeneratorCLI ${{ env.TAG_NAME }}
generate_release_notes: true
files: |
FontGeneratorCLI_win-x64.zip
FontGeneratorCLI_linux-x64.zip
FontGeneratorCLI_linux-arm64.zip