From d2af2531d003aab1864fd547bc5ce94b5e4ad13e Mon Sep 17 00:00:00 2001 From: phluxjr Date: Sat, 7 Mar 2026 15:17:29 -0600 Subject: [PATCH] One does not simply merge into master --- .github/workflows/build.yml | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 09fd882..5cb8a9d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,12 +35,25 @@ jobs: - name: build run: pyinstaller --onefile main.py --name ${{ matrix.output }} - - - name: upload to release - uses: softprops/action-gh-release@v2 + - name: get release upload url + id: get_release + uses: actions/github-script@v7 with: - files: dist/${{ matrix.output }} - draft: false - prerelease: false + script: | + const release = await github.rest.repos.getReleaseByTag({ + owner: context.repo.owner, + repo: context.repo.repo, + tag: context.ref.replace('refs/tags/', '') + }); + return release.data.upload_url; + result-encoding: string + + - name: upload binary + uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.get_release.outputs.result }} + asset_path: dist/${{ matrix.output }} + asset_name: ${{ matrix.output }} + asset_content_type: application/octet-stream