Skip to content

Commit

Permalink
修改工作流文件
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanHanloth committed Nov 16, 2024
1 parent b86211d commit b7e584b
Showing 1 changed file with 43 additions and 16 deletions.
59 changes: 43 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,37 @@ jobs:
pip install -r requirements.txt
shell: cmd

# 进行编译
- 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-disable-console --onefile --standalone --follow-import-to=core --windows-icon-from-ico=icon.ico --windows-file-version=$tag --windows-product-name="Boss Key" --windows-file-description="Boss Key Application" --include-data-file=icon.ico=. --windows-company-name="Ivan Hanloth" --show-progress --mingw64 --copyright="Copyright (C) 2024 Ivan Hanloth All Rights Reserved. " --quiet --assume-yes-for-downloads --output-dir=out Boss-Key.py
# # 进行编译
# - 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-disable-console --onefile --standalone --follow-import-to=core --windows-icon-from-ico=icon.ico --windows-file-version=$tag --windows-product-name="Boss Key" --windows-file-description="Boss Key Application" --include-data-file=icon.ico=. --windows-company-name="Ivan Hanloth" --show-progress --mingw64 --copyright="Copyright (C) 2024 Ivan Hanloth All Rights Reserved. " --quiet --assume-yes-for-downloads --output-dir=out Boss-Key.py

# Build python script into a stand-alone exe
- uses: Nuitka/Nuitka-Action@main
with:
nuitka-version: main
script-name: Boss-Key.py
output-dir: out
windows-disable-console: true
windows-icon-from-ico: icon.ico
windows-file-version: ${{ github.ref_name }}
windows-product-name: "Boss Key"
windows-file-description: "Boss Key Application"
windows-company-name: "Ivan Hanloth"
include-data-file: icon.ico=.
show-progress: true
mingw64: true
quiet: true
assume-yes-for-downloads: true



# 添加版本信息到可执行文件并重命名
- name: Add version information and rename executable
Expand All @@ -60,7 +80,13 @@ jobs:
Rename-Item "out/Boss-Key.exe" $newExeName

ls out

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ github.ref_name }} Build
path: |
out/Boss-Key.exe
# 发布到 GitHub Releases
# - name: Create GitHub Release
# uses: ncipollo/release-action@v1
Expand All @@ -75,10 +101,11 @@ jobs:
uses: softprops/action-gh-release@v2
with:
files: out/Boss-Key-${{ github.ref_name }}.exe
token: ${{ secrets.GITHUB_TOKEN }}
release_name: Release $tag
body: |
This is a release for version $tag
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

0 comments on commit b7e584b

Please sign in to comment.