Skip to content

Commit 9c0e647

Browse files
author
Natsuu
authored
chore: update install workflow to use environment variables for versioning (#34)
1 parent a3a50fb commit 9c0e647

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/install.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
name: install
22

3+
env:
4+
# 版本控制:
5+
# - 设置 VERSION 为空字符串时,下载 latest 版本
6+
# - 设置 VERSION 为具体版本号时(如 v1.2.3),下载指定版本
7+
MAAFW_VERSION: ""
8+
MFAA_VERSION: ""
9+
310
on:
411
push:
512
tags:
@@ -79,7 +86,8 @@ jobs:
7986
with:
8087
repository: MaaXYZ/MaaFramework
8188
fileName: "MAA-${{ matrix.os }}-${{ matrix.arch }}*"
82-
latest: true
89+
latest: ${{ env.MAAFW_VERSION == '' }}
90+
tag: ${{ env.MAAFW_VERSION }}
8391
out-file-path: "deps"
8492
extract: true
8593

@@ -90,7 +98,8 @@ jobs:
9098
with:
9199
repository: SweetSmellFox/MFAAvalonia
92100
fileName: "MFAAvalonia-*-${{ (matrix.os == 'win' && 'win') || (matrix.os == 'macos' && 'osx') || (matrix.os == 'linux' && 'linux') }}-${{ (matrix.arch == 'x86_64' && 'x64') || (matrix.arch == 'aarch64' && 'arm64') }}*"
93-
latest: true
101+
latest: ${{ env.MFAA_VERSION == '' }}
102+
tag: ${{ env.MFAA_VERSION }}
94103
out-file-path: "MFA"
95104
extract: true
96105

0 commit comments

Comments
 (0)