Skip to content

Commit

Permalink
main 푸시가 아니라 release가 생길때 npm과 release에 등록되도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
usbsync committed May 9, 2024
1 parent ca4376c commit b8550d8
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/build-and-publish-packages.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: 'build-and-publish-package'
on:
push:
branches:
- main
release:
types: [created]

jobs:
build-and-publish-package:
runs-on: ubuntu-latest
Expand All @@ -21,3 +21,12 @@ jobs:
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
- name: Upload Artifacts to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./dist/index.js
asset_name: index.js
asset_content_type: text/javascript

0 comments on commit b8550d8

Please sign in to comment.