Skip to content

Commit

Permalink
Update macos-build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
CookSleep authored Jul 18, 2024
1 parent ca19db9 commit a83fff7
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions .github/workflows/macos-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 描述的步骤

0 comments on commit a83fff7

Please sign in to comment.