Skip to content

Commit 7286b89

Browse files
committed
chore: add own action
1 parent 7e64b5d commit 7286b89

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,13 @@ jobs:
2626
- name: Bundle with ncc
2727
run: npx ncc build lib/index.js -o dist
2828

29-
- name: Create release
30-
id: create_release
31-
uses: actions/create-release@v1
32-
env:
33-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34-
with:
35-
tag_name: ${{ github.ref }}
36-
release_name: Release ${{ github.ref }}
37-
draft: false
38-
prerelease: false
39-
40-
- name: Upload release asset
29+
- name: Upload release asset
30+
if: env.RELEASE_EXISTS == 'true'
4131
uses: actions/upload-release-asset@v1
4232
env:
4333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4434
with:
45-
upload_url: ${{ steps.create_release.outputs.upload_url }}
35+
upload_url: ${{ github.api_url }}/repos/${{ github.repository }}/releases/tags/${{ github.ref }}
4636
asset_path: ./dist/index.js
4737
asset_name: index.js
4838
asset_content_type: application/javascript

0 commit comments

Comments
 (0)