From 969aa87a103bbf1dc421b6a98e25e55da9de7796 Mon Sep 17 00:00:00 2001 From: ParticleG Date: Sun, 15 Jan 2023 12:37:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E7=94=A8WIndows=20Action=E5=89=8D?= =?UTF-8?q?=E6=9B=B4=E6=96=B0Tenplate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 71dba168..ce03c45b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -681,6 +681,19 @@ jobs: with: platform: Windows dir: ./ColdClear + - name: Update Windows template + shell: python3 {0} + run: | + version_string = "${{ needs.get-info.outputs.version-string }}" + file_version = (f"{version_string.replace('.', ',')},0") + with open("./.github/build/windows/${{ env.BUILD_TYPE }}/template.rc", "r+", encoding="utf8") as file: + data = file.read() + data = data\ + .replace("@Version", version_string)\ + .replace("@FileVersion", file_version) + file.seek(0) + file.truncate() + file.write(data) - name: Build Windows packages id: build-packages uses: love-actions/love-actions-windows@add-build-installer