From 1a4f39466d0da6fb1ec7e0718872d4ac9f0e6a23 Mon Sep 17 00:00:00 2001 From: Jerry Chen Date: Mon, 20 May 2024 20:56:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BA=86=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=EF=BC=8C=E4=BC=98=E5=8C=96=E4=BA=86=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E6=AD=A5=E9=AA=A4=E3=80=82=20(#36)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/releases.yml | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index 9e71d47..6cd4c79 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -3,7 +3,6 @@ name: build main on: pull_request: types: [closed] - jobs: build: @@ -33,27 +32,12 @@ jobs: pyinstaller -F -w main.py zip -r output.zip dist - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # 使用 softprops/action-gh-release 替换原有的创建和上传发布资产的步骤 + - name: Create and Upload Release + if: github.event.pull_request.merged == true + uses: softprops/action-gh-release@v1 with: - tag_name: ${{ github.event.pull_request.title }} - release_name: 瀚万客服小程序 ${{ github.event.pull_request.title }} - body: ${{ github.event.pull_request.body }} - draft: false - prerelease: false - - - name: Upload Windows Executable and init_conf - uses: actions/upload-release-asset@v1.0.1 + files: | + dist/main.exe env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: | - ${{ github.workspace }}\dist\main.exe - asset_name: | - main.exe - asset_content_type: | - application/octet-stream \ No newline at end of file