build.yml update

This commit is contained in:
yeongpin 2025-02-08 22:50:05 +08:00
parent 53ab15604e
commit 1e290d0417

View File

@ -162,36 +162,24 @@ jobs:
steps: steps:
- name: Get version - name: Get version
shell: bash shell: bash
run: | run: echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
else
echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
fi
- name: Download all artifacts - name: Download all artifacts
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
path: artifacts path: artifacts
- name: Prepare release files - name: List files
run: | run: ls -R artifacts/
cd artifacts
mv CursorFreeVIP_${{ env.VERSION }}_windows.exe/* .
mv CursorFreeVIP_${{ env.VERSION }}_mac_arm64/* .
mv CursorFreeVIP_${{ env.VERSION }}_linux/* .
mv CursorFreeVIP_${{ env.VERSION }}_mac_intel/* .
rm -rf CursorFreeVIP_${{ env.VERSION }}_*/*
- name: Create Release - name: Create Release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
with: with:
files: | files: |
artifacts/CursorFreeVIP_${{ env.VERSION }}_windows.exe artifacts/CursorFreeVIP_${{ env.VERSION }}_windows.exe/CursorFreeVIP.exe
artifacts/CursorFreeVIP_${{ env.VERSION }}_mac_arm64 artifacts/CursorFreeVIP_${{ env.VERSION }}_mac_arm64/CursorFreeVIP
artifacts/CursorFreeVIP_${{ env.VERSION }}_linux artifacts/CursorFreeVIP_${{ env.VERSION }}_linux/CursorFreeVIP
artifacts/CursorFreeVIP_${{ env.VERSION }}_mac_intel artifacts/CursorFreeVIP_${{ env.VERSION }}_mac_intel/CursorFreeVIP
draft: false draft: false
prerelease: false prerelease: false
env: env: