-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add github packages action (#10)
* refractor: rename action * feat: add github packages release action * refractor: remove unnecessary step in action --------- Signed-off-by: Fabio Nettis <[email protected]>
- Loading branch information
1 parent
f72087d
commit 36fb2d4
Showing
2 changed files
with
37 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Publish Package GitHub Registry | ||
on: | ||
release: | ||
types: | ||
- published | ||
jobs: | ||
publish-npm: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Bun | ||
uses: oven-sh/setup-bun@v1 | ||
|
||
- name: Setup Node for GitHub Packages | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.x' | ||
registry-url: 'https://npm.pkg.github.com' | ||
|
||
- name: Install Dependencies | ||
run: bun install --frozen-lockfile | ||
|
||
- name: Test Package | ||
run: bun test | ||
|
||
- name: Build Package | ||
run: bun run build | ||
|
||
- name: Release to GitHub Packages | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters