Skip to content

Commit

Permalink
Update build-test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanHanloth authored Jan 4, 2025
1 parent c501df5 commit d15b0a7
Showing 1 changed file with 4 additions and 28 deletions.
32 changes: 4 additions & 28 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,15 @@ jobs:
# 进行编译
- name: Run Compile
run: |
$tag = '${{ github.ref_name }}'
$tag = $tag -replace '[^0-9.]', ''
$parts = $tag.Split('.')
while ($parts.Length -lt 4) {
$parts += '0'
}
$tag = $parts -join '.'
python -m nuitka --windows-file-version=$tag --show-progress --mingw64 --quiet --assume-yes-for-downloads --output-dir=out Boss-Key.py
python -m nuitka --windows-file-version=0.0.0.0 --show-progress --mingw64 --quiet --assume-yes-for-downloads --output-dir=out Boss-Key.py
# 添加版本信息到可执行文件并重命名
- name: Add version information and rename executable
shell: pwsh
run: |
# 获取标签名作为版本号,去除前缀 refs/tags/
$tag = '${{ github.ref_name }}'
$tag = 'Build-Test'
# 定义新的文件名
$newExeName = "Boss-Key-$tag-onefile.exe"
Expand All @@ -60,23 +53,6 @@ jobs:
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ github.ref_name }} Build
name: Build-Test-Build
path: |
out/Boss-Key-${{ github.ref_name }}-multifile.zip
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
out/Boss-Key-${{ github.ref_name }}-onefile.exe
out/Boss-Key-${{ github.ref_name }}-multifile.zip
token: ${{ secrets.RELEASE }}
name: Boss Key ${{ github.ref_name }}
append_body: |
The executable file for version ${{ github.ref_name }}
make_latest: true
tag_name: ${{ github.ref_name }}
draft: false
prerelease: false
generate_release_notes: true
out/Boss-Key-Build-Test-multifile.zip

0 comments on commit d15b0a7

Please sign in to comment.