From 556d80b7c9cc20ce693039fc5d006b74aefc023c Mon Sep 17 00:00:00 2001 From: LFu Date: Sat, 12 Feb 2022 02:15:30 +0800 Subject: [PATCH] Update npm-publish-github-packages.yml to upload release asset --- .github/workflows/npm-publish-github-packages.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/npm-publish-github-packages.yml b/.github/workflows/npm-publish-github-packages.yml index 837f28f2c..3a3c851a5 100644 --- a/.github/workflows/npm-publish-github-packages.yml +++ b/.github/workflows/npm-publish-github-packages.yml @@ -45,3 +45,14 @@ jobs: uses: actions/upload-artifact@v2.3.1 with: path: fork-awesome.tgz + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + if: github.event_name == 'release' + with: + upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./fork-awesome.tgz + asset_name: fork-awesome.tgz + asset_content_type: application/tar+gzip