Skip to content

Commit

Permalink
Merge pull request #16 from joaopaulomoraes/fix-bun-publish
Browse files Browse the repository at this point in the history
Add workaround to publsih with bun
  • Loading branch information
joaopaulomoraes authored Sep 22, 2023
2 parents 47a61b8 + 901d67c commit c134662
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/publish_to_npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,21 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v1
- uses: pnpm/action-setup@v2
with:
version: 8
run_install: |
args: [--no-lockfile]
- uses: actions/setup-node@v3
with:
node-version: 20.x
registry-url: "https://registry.npmjs.org"
cache: "pnpm"


- run: bun install
- run: bun run build

- name: Publish to NPM
run: pnpm publish --access public --no-git-checks
- run: echo //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} > .npmrc

- name: Authenticate with Registry
run: |
echo "registry=https://registry.npmjs.org/" >> .npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Release package
run: bun run publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"dev": "bun --watch src/index.ts",
"test": "bun test",
"test:watch": "bun --watch test",
"test:ci": "bun test"
"test:ci": "bun test",
"publish": "pnpm publish --access public --no-git-checks"
},
"keywords": [
"json",
Expand Down

0 comments on commit c134662

Please sign in to comment.