Skip to content

Commit cffde70

Browse files
committed
Refactor GitHub Actions workflow to replace deprecated set-output command with new output syntax. Update Windows SDK installation step and add fallback for SignTool download in case of failure.
1 parent 73a8b23 commit cffde70

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,23 @@ jobs:
3131
run: |
3232
VERSION=$(grep "^version=" .env | cut -d'=' -f2)
3333
echo "ENV_VERSION=$VERSION" >> $GITHUB_ENV
34-
echo "::set-output name=version::$VERSION"
34+
echo "version=$VERSION" >> $GITHUB_OUTPUT
3535
echo "Using version from .env file: $VERSION"
3636
3737
- name: Use manual version
3838
id: manual-version
3939
if: ${{ github.event.inputs.use_env_version != 'yes' }}
4040
run: |
41-
echo "::set-output name=version::${{ github.event.inputs.version }}"
41+
echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
4242
echo "Using manually entered version: ${{ github.event.inputs.version }}"
4343
4444
- name: Set final version
4545
id: set-version
4646
run: |
4747
if [ "${{ github.event.inputs.use_env_version }}" == "yes" ]; then
48-
echo "::set-output name=version::${{ env.ENV_VERSION }}"
48+
echo "version=${{ env.ENV_VERSION }}" >> $GITHUB_OUTPUT
4949
else
50-
echo "::set-output name=version::${{ github.event.inputs.version }}"
50+
echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
5151
fi
5252
5353
create-tag:
@@ -107,9 +107,16 @@ jobs:
107107
echo "Version: ${{ env.VERSION }}" >> "dist/CursorFreeVIP_${{ env.VERSION }}_windows.exe.manifest"
108108
echo "Description: Cursor Free VIP Tool" >> "dist/CursorFreeVIP_${{ env.VERSION }}_windows.exe.manifest"
109109
110-
- name: Install SignTool
110+
- name: Install Windows SDK
111111
run: |
112-
choco install windows-sdk-10-version-2004-all -y
112+
# 使用更新的包名
113+
choco install windows-sdk-10 -y || echo "Windows SDK installation skipped, continuing build..."
114+
115+
- name: Download SignTool (fallback)
116+
if: ${{ failure() }}
117+
run: |
118+
mkdir -p tools
119+
Invoke-WebRequest -Uri "https://download.microsoft.com/download/1/5/6/156F6D1A-8A5F-4B9E-839A-BF3C5D8A8861/signtool.exe" -OutFile "tools/signtool.exe" || echo "SignTool download failed, signing will be skipped"
113120
114121
- name: Create self-signed certificate
115122
if: false # Disabled until we have a proper certificate

0 commit comments

Comments
 (0)