Skip to content

Update version to 0.10.0 #3

Update version to 0.10.0

Update version to 0.10.0 #3

Workflow file for this run

name: Build
on:
push:
branches:
- master
- test
paths-ignore:
- '*.md'
- 'assets/**'
- '**/.gitignore'
workflow_dispatch:
concurrency:
group: build
cancel-in-progress: true
jobs:
check-cache:
runs-on: windows-latest
outputs:
commit-id: ${{ steps.get-tools-commit-id.outputs.id }}
cache-hit: ${{ steps.cache-tools.outputs.cache-hit }}
steps:
- uses: actions/checkout@v4
with:
repository: Xzonn/STRAHChsLocalizationHelper
ref: master
- name: Get tools commit id
id: get-tools-commit-id
run: |
Write-Output "id=$(git rev-parse HEAD)" >> $env:GITHUB_OUTPUT
- name: Cache tools
id: cache-tools
uses: actions/cache@v4
with:
path: STRAHChsLocalizationHelper/bin/Release/net8.0-windows/win-x64/publish/
key: tools-${{ steps.get-tools-commit-id.outputs.id }}
build-tools:
needs: check-cache
if: needs.check-cache.outputs.cache-hit != 'true'
uses: Xzonn/STRAHChsLocalizationHelper/.github/workflows/build.yml@master
build:
needs: [check-cache, build-tools]
if: ${{ always() }}
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
fetch-depth: 1
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Commit Information
id: commit
run: |
echo "commit_id=commit-$(git rev-parse --short HEAD)" >> $env:GITHUB_OUTPUT
echo "commit_message=$(git log -1 --pretty=%s)" >> $env:GITHUB_OUTPUT
- name: Cache tools
id: cache-tools
uses: actions/cache@v4
with:
path: STRAHChsLocalizationHelper/bin/Release/net8.0-windows/win-x64/publish/
key: tools-${{ needs.check-cache.outputs.commit-id }}
- name: Download tools
if: needs.check-cache.outputs.cache-hit != 'true'
uses: actions/download-artifact@v4
with:
name: STRAHChsLocalizationHelper
path: STRAHChsLocalizationHelper/bin/Release/net8.0-windows/win-x64/publish/
- name: Cache fonts
id: cache-fonts
uses: actions/cache@v4
with:
path: files/fonts/*.ttf
key: fonts-${{ hashFiles('scripts/download_fonts.ps1') }}
- name: Download fonts
if: steps.cache-fonts.outputs.cache-hit != 'true'
run: |
scripts/download_fonts.ps1
- name: Create Patch
run: |
python scripts/convert_csv_to_json.py
STRAHChsLocalizationHelper/bin/Release/net8.0-windows/win-x64/publish/STRAHChsLocalizationHelper
Compress-Archive -Path "out/01005940182ec000/" -Destination "out/patch-switch.zip" -Force
env:
XZ_GAME: STRAH
- name: Upload patch
uses: actions/upload-artifact@v4
with:
name: patch
path: |
out/01005940182ec000/
- name: GitHub Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: out/patch-switch.zip
body: |
本页面下方的链接为自动构建并发布的开发版本补丁。此版本补丁可能存在较多问题,仅供测试使用。
name: ${{ steps.commit.outputs.commit_message }}
tag: publish
token: ${{ secrets.GITHUB_TOKEN }}