Skip to content

Commit 226b766

Browse files
fix: npm token
1 parent 06e5cc3 commit 226b766

File tree

1 file changed

+156
-162
lines changed

1 file changed

+156
-162
lines changed

.github/workflows/DuckDBNodeBindingsAndAPI.yml

Lines changed: 156 additions & 162 deletions
Original file line numberDiff line numberDiff line change
@@ -116,173 +116,167 @@ jobs:
116116
run: git status
117117

118118
- name: Publish - Bindings - Linux x64
119-
if: ${{ inputs.publish }}
120-
working-directory: bindings/pkgs/@databrainhq/node-bindings-linux-x64
121-
run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }}
122-
env:
123-
NPM_AUTH_TOKEN: ${{ secrets.DUCKDB_NPM_TOKEN }}
124-
YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}
125-
126-
- name: Publish - Bindings
127-
if: ${{ inputs.publish }}
128-
working-directory: bindings/pkgs/@databrainhq/node-bindings
129-
run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }}
130-
env:
131-
NPM_AUTH_TOKEN: ${{ secrets.DUCKDB_NPM_TOKEN }}
132-
YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}
133-
134-
- name: Publish - API
135-
if: ${{ inputs.publish }}
136-
working-directory: api/pkgs/@databrainhq/node-api
137-
run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }}
138-
env:
139-
NPM_AUTH_TOKEN: ${{ secrets.DUCKDB_NPM_TOKEN }}
140-
YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}
141-
142-
linux_arm64:
143-
name: Linux arm64
144-
runs-on: ubuntu-latest
145-
if: ${{ inputs.linux_arm64 }}
146-
env:
147-
TARGET_ARCH: arm64
148-
CC: aarch64-linux-gnu-gcc
149-
CXX: aarch64-linux-gnu-g++
150-
YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}
151-
152-
steps:
153-
- name: Install aarch64 compilers
154-
run: sudo apt-get update && sudo apt install binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
155-
156-
- name: Checkout code
157-
uses: actions/checkout@v4
158-
159-
- name: Setup Node.js
160-
uses: actions/setup-node@v4
161-
with:
162-
node-version: '20'
163-
registry-url: 'https://registry.npmjs.org/'
164-
165-
- uses: pnpm/action-setup@v3
119+
- uses: JS-DevTools/npm-publish@v2
166120
with:
167-
version: 9
168-
169-
- name: Workspace - Install
170-
run: pnpm install --ignore-scripts
171-
172-
- name: Bindings - Build
173-
working-directory: bindings
174-
run: pnpm run build
175-
176-
- name: Git Status
177-
if: ${{ inputs.publish }}
178-
run: git status
179-
180-
- name: Publish - Bindings - Linux arm64
181-
if: ${{ inputs.publish }}
182-
working-directory: bindings/pkgs/@databrainhq/node-bindings-linux-arm64
183-
run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }}
184-
env:
185-
NPM_AUTH_TOKEN: ${{ secrets.DUCKDB_NPM_TOKEN }}
186-
YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}
187-
188-
macos_arm64:
189-
name: Mac OS X arm64
190-
runs-on: macos-latest
191-
if: ${{ inputs.macos_arm64 }}
192-
steps:
193-
- name: Checkout code
194-
uses: actions/checkout@v4
121+
token: ${{ secrets.DUCKDB_NPM_TOKEN }}
122+
package: bindings/pkgs/@databrainhq/node-bindings-linux-x64
195123

196-
- name: Setup Node.js
197-
uses: actions/setup-node@v4
198-
with:
199-
node-version: '20'
200-
registry-url: 'https://registry.npmjs.org/'
201-
202-
- uses: pnpm/action-setup@v3
124+
- name: Publish - Bindings
125+
- uses: JS-DevTools/npm-publish@v2
203126
with:
204-
version: 9
205-
206-
- name: Workspace - Install
207-
run: pnpm install --ignore-scripts
127+
token: ${{ secrets.DUCKDB_NPM_TOKEN }}
128+
package: bindings/pkgs/@databrainhq/node-bindings
208129

209-
- name: Bindings - Build
210-
working-directory: bindings
211-
run: pnpm run build
212-
213-
- name: Bindings - Test
214-
working-directory: bindings
215-
run: pnpm test
216-
217-
- name: API - Build
218-
working-directory: api
219-
run: pnpm run build
220-
221-
# - name: API - Test
222-
# working-directory: api
223-
# run: pnpm test
224-
225-
- name: Git Status
226-
if: ${{ inputs.publish }}
227-
run: git status
228-
229-
- name: Publish - Bindings - Darwin arm64
230-
if: ${{ inputs.publish }}
231-
working-directory: bindings/pkgs/@databrainhq/node-bindings-darwin-arm64
232-
run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }}
233-
env:
234-
NPM_AUTH_TOKEN: ${{ secrets.DUCKDB_NPM_TOKEN }}
235-
YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}
236-
237-
macos_x64:
238-
name: Mac OS X x64
239-
runs-on: macos-13
240-
if: ${{ inputs.macos_x64 }}
241-
steps:
242-
- name: Checkout code
243-
uses: actions/checkout@v4
244-
245-
- name: Setup Node.js
246-
uses: actions/setup-node@v4
247-
with:
248-
node-version: '20'
249-
registry-url: 'https://registry.npmjs.org/'
250-
- uses: pnpm/action-setup@v3
130+
- name: Publish - API
131+
- uses: JS-DevTools/npm-publish@v2
251132
with:
252-
version: 9
253-
254-
- name: Workspace - Install
255-
run: pnpm install --ignore-scripts
256-
257-
- name: Bindings - Build
258-
working-directory: bindings
259-
run: pnpm run build
260-
261-
- name: Bindings - Test
262-
working-directory: bindings
263-
run: pnpm test
264-
265-
- name: API - Build
266-
working-directory: api
267-
run: pnpm run build
268-
269-
# - name: API - Test
270-
# working-directory: api
271-
# run: pnpm test
272-
273-
- name: Git Status
274-
if: ${{ inputs.publish }}
275-
run: git status
276-
277-
- name: Publish - Bindings - Darwin x64
278-
if: ${{ inputs.publish }}
279-
working-directory: bindings/pkgs/@databrainhq/node-bindings-darwin-x64
280-
run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }}
281-
env:
282-
NPM_AUTH_TOKEN: ${{ secrets.DUCKDB_NPM_TOKEN }}
283-
YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}
284-
285-
windows_x64:
133+
token: ${{ secrets.DUCKDB_NPM_TOKEN }}
134+
package: api/pkgs/@databrainhq/node-api
135+
136+
# linux_arm64:
137+
# name: Linux arm64
138+
# runs-on: ubuntu-latest
139+
# if: ${{ inputs.linux_arm64 }}
140+
# env:
141+
# TARGET_ARCH: arm64
142+
# CC: aarch64-linux-gnu-gcc
143+
# CXX: aarch64-linux-gnu-g++
144+
# YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}
145+
146+
# steps:
147+
# - name: Install aarch64 compilers
148+
# run: sudo apt-get update && sudo apt install binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
149+
150+
# - name: Checkout code
151+
# uses: actions/checkout@v4
152+
153+
# - name: Setup Node.js
154+
# uses: actions/setup-node@v4
155+
# with:
156+
# node-version: '20'
157+
# registry-url: 'https://registry.npmjs.org/'
158+
159+
# - uses: pnpm/action-setup@v3
160+
# with:
161+
# version: 9
162+
163+
# - name: Workspace - Install
164+
# run: pnpm install --ignore-scripts
165+
166+
# - name: Bindings - Build
167+
# working-directory: bindings
168+
# run: pnpm run build
169+
170+
# - name: Git Status
171+
# if: ${{ inputs.publish }}
172+
# run: git status
173+
174+
# - name: Publish - Bindings - Linux arm64
175+
# if: ${{ inputs.publish }}
176+
# working-directory: bindings/pkgs/@databrainhq/node-bindings-linux-arm64
177+
# run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }}
178+
# env:
179+
# NPM_AUTH_TOKEN: ${{ secrets.DUCKDB_NPM_TOKEN }}
180+
# YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}
181+
182+
# macos_arm64:
183+
# name: Mac OS X arm64
184+
# runs-on: macos-latest
185+
# if: ${{ inputs.macos_arm64 }}
186+
# steps:
187+
# - name: Checkout code
188+
# uses: actions/checkout@v4
189+
190+
# - name: Setup Node.js
191+
# uses: actions/setup-node@v4
192+
# with:
193+
# node-version: '20'
194+
# registry-url: 'https://registry.npmjs.org/'
195+
196+
# - uses: pnpm/action-setup@v3
197+
# with:
198+
# version: 9
199+
200+
# - name: Workspace - Install
201+
# run: pnpm install --ignore-scripts
202+
203+
# - name: Bindings - Build
204+
# working-directory: bindings
205+
# run: pnpm run build
206+
207+
# - name: Bindings - Test
208+
# working-directory: bindings
209+
# run: pnpm test
210+
211+
# - name: API - Build
212+
# working-directory: api
213+
# run: pnpm run build
214+
215+
# # - name: API - Test
216+
# # working-directory: api
217+
# # run: pnpm test
218+
219+
# - name: Git Status
220+
# if: ${{ inputs.publish }}
221+
# run: git status
222+
223+
# - name: Publish - Bindings - Darwin arm64
224+
# if: ${{ inputs.publish }}
225+
# working-directory: bindings/pkgs/@databrainhq/node-bindings-darwin-arm64
226+
# run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }}
227+
# env:
228+
# NPM_AUTH_TOKEN: ${{ secrets.DUCKDB_NPM_TOKEN }}
229+
# YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}
230+
231+
# macos_x64:
232+
# name: Mac OS X x64
233+
# runs-on: macos-13
234+
# if: ${{ inputs.macos_x64 }}
235+
# steps:
236+
# - name: Checkout code
237+
# uses: actions/checkout@v4
238+
239+
# - name: Setup Node.js
240+
# uses: actions/setup-node@v4
241+
# with:
242+
# node-version: '20'
243+
# registry-url: 'https://registry.npmjs.org/'
244+
# - uses: pnpm/action-setup@v3
245+
# with:
246+
# version: 9
247+
248+
# - name: Workspace - Install
249+
# run: pnpm install --ignore-scripts
250+
251+
# - name: Bindings - Build
252+
# working-directory: bindings
253+
# run: pnpm run build
254+
255+
# - name: Bindings - Test
256+
# working-directory: bindings
257+
# run: pnpm test
258+
259+
# - name: API - Build
260+
# working-directory: api
261+
# run: pnpm run build
262+
263+
# # - name: API - Test
264+
# # working-directory: api
265+
# # run: pnpm test
266+
267+
# - name: Git Status
268+
# if: ${{ inputs.publish }}
269+
# run: git status
270+
271+
# - name: Publish - Bindings - Darwin x64
272+
# if: ${{ inputs.publish }}
273+
# working-directory: bindings/pkgs/@databrainhq/node-bindings-darwin-x64
274+
# run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }}
275+
# env:
276+
# NPM_AUTH_TOKEN: ${{ secrets.DUCKDB_NPM_TOKEN }}
277+
# YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}
278+
279+
# windows_x64:
286280
name: Windows x64
287281
runs-on: windows-latest
288282
if: ${{ inputs.windows_x64 }}

0 commit comments

Comments
 (0)