Skip to content

Update workflow

Update workflow #2

Workflow file for this run

name: Build
on:
push:
branches:
- master
paths-ignore:
- '*.md'
- 'assets/'
workflow_dispatch:
concurrency:
group: build
cancel-in-progress: true
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
ref: master
fetch-depth: 1
- name: Commit Information
id: commit
run: |
echo "commit_message=$(git log -1 --pretty=%s)" >> $env:GITHUB_OUTPUT
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- run: pip install Pillow
- run: echo "${{ secrets.ORIGINAL_FILES_URL }}" > original_files_url.txt
- name: Cache original files
id: cache-original-files
uses: actions/cache@v3
with:
path: original_files/
key: original-files-${{ hashFiles('original_files_url.txt') }}
- name: Cache dotnet script
id: cache-dotnet-script
uses: actions/cache@v3
with:
path: ~/.dotnet/tools/
key: original-files-dotnet-script
- name: Build patch
env:
ORIGINAL_FILES_URL: "${{ secrets.ORIGINAL_FILES_URL }}"
PYTHONUTF8: 1
run: |
Try
{
if (dotnet-script -h) {}
}
Catch
{
dotnet tool install -g dotnet-script
}
./build.ps1
- name: Upload patch
uses: actions/upload-artifact@v3
with:
name: patch
path: |
out/patch/*
- name: GitHub Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: "out/patch.xzp"
name: "${{ steps.commit.outputs.commit_message }}"
body: |
本页面下方的链接为自动构建并发布的开发版本补丁。**此版本补丁可能存在较多问题,仅供测试使用。
**[原始 ROM](https://datomatic.no-intro.org/index.php?page=show_record&s=28&n=3810) 的 md5 校验码为:`5933d51fd3bfce700fea8a61e6783fc2`。
请访问 [此处](https://github.com/Xzonn/NitroPatcher/releases/latest/) 获取补丁应用工具。
prerelease: true
tag: publish
token: ${{ secrets.GITHUB_TOKEN }}