05-30 ParaToGitWork & v0.6.38 #190
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: 开发版 | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'src/**' | |
jobs: | |
dev: | |
runs-on: windows-latest | |
steps: | |
- name: Check Ver | |
id: extract_version | |
run: | | |
$response = Invoke-WebRequest -Uri https://api.github.com/repos/LocalizeLimbusCompany/LocalizeLimbusCompany/releases/latest -Method Get | |
curl -o CHANGELOG.md https://raw.githubusercontent.com/LocalizeLimbusCompany/LocalizeLimbusCompany/main/CHANGELOG.md | |
$version = Get-Content -Path CHANGELOG.md | Select-Object -First 1 | ForEach-Object { $_ -replace '# ', '' } | |
$content = $response.Content | ConvertFrom-Json | |
if (!($content.tag_name -eq $version)) { | |
echo "hasnewver=true" >> $env:GITHUB_OUTPUT | |
echo "release_tag=$version" >> $env:GITHUB_OUTPUT | |
} else { | |
echo "no newver" | |
} | |
- name: 触发工作流 | |
if: steps.extract_version.outputs.hasnewver == 'true' | |
uses: benc-uk/workflow-dispatch@v1 | |
with: | |
workflow: release.yml | |
inputs: '{ "version": "${{ steps.extract_version.outputs.release_tag }}" }' | |
- name: Checkout code | |
if: steps.extract_version.outputs.hasnewver != 'true' | |
uses: actions/checkout@v4 | |
- name: Cache NuGet packages | |
if: steps.extract_version.outputs.hasnewver != 'true' | |
uses: actions/cache@v4 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('src/*.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: Run build script | |
if: steps.extract_version.outputs.hasnewver != 'true' | |
run: | | |
./build.ps1 Dev | |
- name: Upload BIE Full | |
if: steps.extract_version.outputs.hasnewver != 'true' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: LimbusLocalize_BIE_Dev.7z | |
path: Release/LimbusLocalize_BIE_Dev.7z |