Skip to content
This repository has been archived by the owner on Dec 22, 2024. It is now read-only.

更新 build.yml

更新 build.yml #4

Workflow file for this run

name: Build
on:
push:
branches:
- main
jobs:
build:
runs-on: windows-2019
steps:
- name: Check out git repository
uses: actions/checkout@v4
# Push tag to GitHub if package.json version's tag is not tagged
- name: Get package version
shell: powershell
run: |
$version = (Get-Content package.json | ConvertFrom-Json).version
echo "PACKAGE_VERSION=$version" >> $env:GITHUB_ENV
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: 3.11.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build
uses: Nuitka/Nuitka-Action@main
with:
nuitka-version: main
script-name: main.py
standalone: true
onefile: true
disable-console: true
enable-plugins: tk-inter, upx
show-memory: true
windows-uac-admin: true
windows-icon-from-ico: icon.jpg
company-name: ikunshare
product-name: Game Uninstaller
file-version: ${{ env.PACKAGE_VERSION }}
product-version: ${{ env.PACKAGE_VERSION }}
file-description: 删除SteamTools或GreenLuma解锁的游戏
copyright: Copyright © 2024 ikun0014
output-file: Game Uninstaller---v${{ env.PACKAGE_VERSION }}.exe
assume-yes-for-downloads: true
output-dir: build
- name: Create git tag
uses: pkgdeps/git-tag-action@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_repo: ${{ github.repository }}
version: ${{ env.PACKAGE_VERSION }}
git_commit_sha: ${{ github.sha }}
git_tag_prefix: "v"
- name: Release
uses: softprops/action-gh-release@v2
with:
prerelease: false
draft: false
tag_name: v${{ env.PACKAGE_VERSION }}
files: |
build/Game Uninstaller---v${{ env.PACKAGE_VERSION }}.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}