0
0
mirror of https://github.com/yeongpin/cursor-free-vip.git synced 2025-04-24 08:25:23 +00:00

Update version to 1.10.05, remove block_domain.txt from build specification, and enhance GitHub Actions workflow to dynamically determine version from .env file or manual input. Update CHANGELOG for new version release.

This commit is contained in:
yeongpin 2025-04-22 10:27:08 +08:00
parent 6d182fda55
commit 73a8b23257
4 changed files with 95 additions and 21 deletions

4
.env
View File

@ -1,2 +1,2 @@
version=1.10.04
VERSION=1.10.04
version=1.10.05
VERSION=1.10.05

View File

@ -3,10 +3,14 @@ name: Build Executables
on:
workflow_dispatch:
inputs:
version:
description: 'Version number (e.g. 1.0.9)'
use_env_version:
description: 'Use version from .env file (yes/no)'
required: true
default: '1.10.04'
default: 'yes'
version:
description: 'Version number (only used if not using .env version)'
required: false
default: ''
permissions:
contents: write
@ -14,7 +18,40 @@ permissions:
packages: write
jobs:
determine-version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.set-version.outputs.version }}
steps:
- uses: actions/checkout@v2
- name: Get version from .env file
id: env-version
if: ${{ github.event.inputs.use_env_version == 'yes' }}
run: |
VERSION=$(grep "^version=" .env | cut -d'=' -f2)
echo "ENV_VERSION=$VERSION" >> $GITHUB_ENV
echo "::set-output name=version::$VERSION"
echo "Using version from .env file: $VERSION"
- name: Use manual version
id: manual-version
if: ${{ github.event.inputs.use_env_version != 'yes' }}
run: |
echo "::set-output name=version::${{ github.event.inputs.version }}"
echo "Using manually entered version: ${{ github.event.inputs.version }}"
- name: Set final version
id: set-version
run: |
if [ "${{ github.event.inputs.use_env_version }}" == "yes" ]; then
echo "::set-output name=version::${{ env.ENV_VERSION }}"
else
echo "::set-output name=version::${{ github.event.inputs.version }}"
fi
create-tag:
needs: determine-version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@ -23,18 +60,18 @@ jobs:
- name: Delete existing tag if exists
run: |
if git ls-remote --tags origin | grep -q "refs/tags/v${{ github.event.inputs.version }}"; then
git push origin --delete "v${{ github.event.inputs.version }}" || true
git tag -d "v${{ github.event.inputs.version }}" || true
if git ls-remote --tags origin | grep -q "refs/tags/v${{ needs.determine-version.outputs.version }}"; then
git push origin --delete "v${{ needs.determine-version.outputs.version }}" || true
git tag -d "v${{ needs.determine-version.outputs.version }}" || true
fi
- name: Create Tag
run: |
git tag "v${{ github.event.inputs.version }}"
git push origin "v${{ github.event.inputs.version }}"
git tag "v${{ needs.determine-version.outputs.version }}"
git push origin "v${{ needs.determine-version.outputs.version }}"
build-windows:
needs: create-tag
needs: [determine-version, create-tag]
runs-on: windows-latest
steps:
@ -47,7 +84,7 @@ jobs:
- name: Set version
shell: bash
run: echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
run: echo "VERSION=${{ needs.determine-version.outputs.version }}" >> $GITHUB_ENV
- name: Install dependencies
run: |
@ -59,6 +96,33 @@ jobs:
run: |
pyinstaller build.spec
- name: Add Windows Defender exclusions
run: |
# 创建一个 .exe.config 文件,有时可以减少误报
echo '<?xml version="1.0" encoding="utf-8" ?><configuration><runtime><generatePublisherEvidence enabled="false"/></runtime></configuration>' > "dist/CursorFreeVIP_${{ env.VERSION }}_windows.exe.config"
# 添加数字签名信息文件
echo "CursorFreeVIP ${{ env.VERSION }}" > "dist/CursorFreeVIP_${{ env.VERSION }}_windows.exe.manifest"
echo "Publisher: CursorFreeVIP Project" >> "dist/CursorFreeVIP_${{ env.VERSION }}_windows.exe.manifest"
echo "Version: ${{ env.VERSION }}" >> "dist/CursorFreeVIP_${{ env.VERSION }}_windows.exe.manifest"
echo "Description: Cursor Free VIP Tool" >> "dist/CursorFreeVIP_${{ env.VERSION }}_windows.exe.manifest"
- name: Install SignTool
run: |
choco install windows-sdk-10-version-2004-all -y
- name: Create self-signed certificate
if: false # Disabled until we have a proper certificate
run: |
$cert = New-SelfSignedCertificate -Subject "CN=CursorFreeVIP" -Type CodeSigning -CertStoreLocation Cert:\CurrentUser\My
$pwd = ConvertTo-SecureString -String "password" -Force -AsPlainText
Export-PfxCertificate -Cert $cert -FilePath certificate.pfx -Password $pwd
- name: Sign executable
if: false # Disabled until we have a proper certificate
run: |
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /f certificate.pfx /p password /t http://timestamp.digicert.com /d "CursorFreeVIP" /v "dist/CursorFreeVIP_${{ env.VERSION }}_windows.exe"
- name: Upload Windows artifact
uses: actions/upload-artifact@v4
with:
@ -66,7 +130,7 @@ jobs:
path: dist/CursorFreeVIP_${{ env.VERSION }}_windows.exe
build-macos-arm64:
needs: create-tag
needs: [determine-version, create-tag]
runs-on: macos-latest
steps:
@ -79,7 +143,7 @@ jobs:
- name: Set version
shell: bash
run: echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
run: echo "VERSION=${{ needs.determine-version.outputs.version }}" >> $GITHUB_ENV
- name: Install dependencies
run: |
@ -92,6 +156,11 @@ jobs:
pyinstaller build.spec
mv "dist/CursorFreeVIP_${{ env.VERSION }}_mac" "dist/CursorFreeVIP_${{ env.VERSION }}_mac_arm64"
- name: Sign macOS executable
if: false # Disabled until we have a proper certificate
run: |
codesign --force --options runtime --sign "Developer ID Application" "dist/CursorFreeVIP_${{ env.VERSION }}_mac_arm64"
- name: Upload MacOS ARM artifact
uses: actions/upload-artifact@v4
with:
@ -112,7 +181,7 @@ jobs:
- name: Set version
shell: bash
run: echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
run: echo "VERSION=${{ needs.determine-version.outputs.version }}" >> $GITHUB_ENV
- name: Install dependencies
run: |
@ -149,7 +218,7 @@ jobs:
- name: Set version
shell: bash
run: echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
run: echo "VERSION=${{ needs.determine-version.outputs.version }}" >> $GITHUB_ENV
- name: Build in ARM64 Docker container
run: |
@ -184,7 +253,7 @@ jobs:
- name: Set version
shell: bash
run: echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
run: echo "VERSION=${{ needs.determine-version.outputs.version }}" >> $GITHUB_ENV
- name: Install dependencies
run: |
@ -207,7 +276,7 @@ jobs:
path: dist/CursorFreeVIP_${{ env.VERSION }}_mac_intel
create-release:
needs: [build-windows, build-macos-arm64, build-linux-x64, build-linux-arm64, build-macos-intel]
needs: [determine-version, build-windows, build-macos-arm64, build-linux-x64, build-linux-arm64, build-macos-intel]
runs-on: ubuntu-22.04
steps:
@ -216,7 +285,7 @@ jobs:
- name: Get version
shell: bash
run: echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
run: echo "VERSION=${{ needs.determine-version.outputs.version }}" >> $GITHUB_ENV
- name: Download all artifacts
uses: actions/download-artifact@v4

View File

@ -1,5 +1,11 @@
# Change Log
## v1.10.05
1. Remove block_domain.txt | 移除 block_domain.txt
2. Original Code In Github , If u afraid of virus, please clone the code and run locally | 原始碼在 Github 上,如果怕病毒,請複製原始碼並在本機運行
3. Fix: Some Issues | 修復一些問題
## v1.10.04
1. Hotfix: Reset Process Error: cannot access local variable 'main_path' where it is not associated with a value on windows & macos | 修復在 Windows 和 macOS 上無法訪問局部變量 'main_path' 的問題
2. Fix: Some Issues | 修復一些問題

View File

@ -26,8 +26,7 @@ a = Analysis(
('locales', 'locales'),
('quit_cursor.py', '.'),
('utils.py', '.'),
('.env', '.'),
('block_domain.txt', '.')
('.env', '.')
],
hiddenimports=[
'quit_cursor',