Merge pull request #351 from zhamao-robot/fix-release-artifact

修复 Release Artifact 构建
This commit is contained in:
sunxyw 2023-04-23 18:24:10 +08:00 committed by GitHub
commit ed201993a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
@ -68,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 }}