Skip to content

Commit ceb56be

Browse files
authored
feat(action): update workflow to streamline package publishing
1 parent ebb95d8 commit ceb56be

1 file changed

Lines changed: 4 additions & 18 deletions

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88
permissions:
99
contents: write
1010
id-token: write
11-
packages: write
1211

1312
jobs:
1413
release:
@@ -24,7 +23,6 @@ jobs:
2423
uses: actions/setup-node@v6
2524
with:
2625
node-version: '24'
27-
registry-url: 'https://registry.npmjs.org'
2826

2927
- name: Setup Bun
3028
uses: oven-sh/setup-bun@v2
@@ -55,22 +53,10 @@ jobs:
5553
- name: Update npm
5654
run: npm install -g npm@latest
5755

58-
- name: Pack package
59-
run: bun pm pack
56+
- name: Publish packages to npm
57+
run: bun pm pack && npm publish ./*.tgz --access public --registry=https://registry.npmjs.org
6058

61-
- name: Publish to npm
62-
run: npm publish ./*.tgz --access public
63-
env:
64-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
65-
66-
- name: Configure GitHub Packages registry
67-
run: |
68-
echo "@rasvanjaya21:registry=https://npm.pkg.github.com" >> ~/.npmrc
69-
echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" >> ~/.npmrc
70-
env:
71-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72-
73-
- name: Publish to GitHub Packages
74-
run: npm publish ./*.tgz --registry=https://npm.pkg.github.com
59+
- name: Publish to github packages
60+
run: bun pm pack && npm publish ./*.tgz --access public --registry=https://npm.pkg.github.com
7561
env:
7662
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)