From 8ed002d0f2fc59b2799f5ef14746e67f5751528d Mon Sep 17 00:00:00 2001 From: sunxyw Date: Sun, 23 Apr 2023 16:30:12 +0800 Subject: [PATCH 1/2] fix build release artifact action --- .github/workflows/build-release-artifacts.yml | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-release-artifacts.yml b/.github/workflows/build-release-artifacts.yml index 573da797..9f7388f8 100644 --- a/.github/workflows/build-release-artifacts.yml +++ b/.github/workflows/build-release-artifacts.yml @@ -30,19 +30,10 @@ jobs: - name: Build Phar run: ./zhamao build - - name: Get Latest Release Upload URL - id: get-latest-release - run: curl https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r '.upload_url' | sed 's/{?name,label}//g' > upload_url.txt - - - name: Upload Phar - run: | - curl -X POST \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"\ - -H "X-GitHub-Api-Version: 2022-11-28" \ - -H "Content-Type: application/octet-stream" \ - $(cat upload_url.txt)/zm.phar \ - --data-binary "@build/zm.phar" + - name: Upload Release Asset + uses: softprops/action-gh-release@v1 + with: + files: build/zm.phar update-changelog: name: Update Changelog From bbbf8492ea58b612c0a2b486c10334e220e2211e Mon Sep 17 00:00:00 2001 From: sunxyw Date: Sun, 23 Apr 2023 16:50:53 +0800 Subject: [PATCH 2/2] fix changelog update commitish --- .github/workflows/build-release-artifacts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-release-artifacts.yml b/.github/workflows/build-release-artifacts.yml index 9f7388f8..d95e7d04 100644 --- a/.github/workflows/build-release-artifacts.yml +++ b/.github/workflows/build-release-artifacts.yml @@ -59,4 +59,4 @@ jobs: uses: stefanzweifel/git-auto-commit-action@v4 with: commit_message: update changelog - branch: ${{ github.base_ref }} + branch: ${{ github.event.release.target_commitish }}