diff --git a/.github/workflows/macos-build.yml b/.github/workflows/macos-build.yml index 1e71dbe..18b51ca 100644 --- a/.github/workflows/macos-build.yml +++ b/.github/workflows/macos-build.yml @@ -31,7 +31,7 @@ jobs: - name: Create ZIP archive run: | cd dist - zip -r "../项目文件导出工具-macOS.zip" "项目文件导出工具.app" + zip -r "../Project_Exporter-macOS.zip" "项目文件导出工具.app" cd .. echo "Contents of current directory:" ls -l @@ -46,28 +46,16 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, }); - core.setOutput('upload_url', response.data.upload_url); - core.setOutput('release_id', response.data.id); + return { upload_url: response.data.upload_url, release_id: response.data.id }; - name: Upload to Release uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.get_release.outputs.upload_url }} - asset_path: ./项目文件导出工具-macOS.zip - asset_name: 项目文件导出工具-macOS.zip + upload_url: ${{ fromJSON(steps.get_release.outputs.result).upload_url }} + asset_path: ./Project_Exporter-macOS.zip + asset_name: Project_Exporter-macOS.zip asset_content_type: application/zip - - name: Update Release - if: github.event_name == 'workflow_dispatch' - uses: actions/github-script@v6 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - github.rest.repos.updateRelease({ - owner: context.repo.owner, - repo: context.repo.repo, - release_id: ${{ steps.get_release.outputs.release_id }}, - body: 'This release has been updated with a new build on ${{ github.event.repository.updated_at }}' - }) + # 移除更新 Release 描述的步骤