Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,25 @@ jobs:
# Requires:
# 1. Package claimed on npmjs.com: @vmvarela/sql-pipe
# 2. Trusted Publishing configured on npmjs.com for repo vmvarela/sql-pipe, workflow release.yml
# 3. No NPM_TOKEN secret needed — uses OIDC (id-token: write)
# 3. Repository variable NPM_TRUSTED_PUBLISHING=true set after configuring npm Trusted Publisher
# 4. No NPM_TOKEN secret needed — uses OIDC (id-token: write)
publish-npm:
name: Publish to npm
needs: release
if: ${{ vars.NPM_TRUSTED_PUBLISHING == 'true' }}
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v7

- uses: actions/setup-node@v6
with:
node-version: 24
registry-url: https://registry.npmjs.org
package-manager-cache: false

- name: Download all artifacts
uses: actions/download-artifact@v8
with:
Expand All @@ -184,6 +194,8 @@ jobs:
- name: Stage npm binaries
run: |
mkdir -p npm-pkg/bin
cp -r packaging/npm/. npm-pkg/
cp LICENSE npm-pkg/LICENSE
cp artifacts/sql-pipe-x86_64-linux npm-pkg/bin/sql-pipe-linux-x64
cp artifacts/sql-pipe-aarch64-linux npm-pkg/bin/sql-pipe-linux-arm64
cp artifacts/sql-pipe-armv7-linux npm-pkg/bin/sql-pipe-linux-arm
Expand All @@ -192,18 +204,13 @@ jobs:
cp artifacts/sql-pipe-x86_64-windows.exe npm-pkg/bin/sql-pipe-win32-x64.exe
chmod +x npm-pkg/bin/sql-pipe-linux-* npm-pkg/bin/sql-pipe-darwin-*

- name: Copy packaging files
run: |
cp -r packaging/npm/* npm-pkg/

- name: Set package version
run: |
VERSION="${GITHUB_REF_NAME#v}"
npm version "$VERSION" --no-git-tag-version --workspaces=false --prefix ./npm-pkg

- name: Publish to npm
run: npm publish ./npm-pkg --provenance --access public
continue-on-error: true

# ── Update Homebrew tap ─────────────────────────────────────────────
# Requires:
Expand Down
6 changes: 3 additions & 3 deletions packaging/npm/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@vmvarela/sql-pipe",
"version": "0.24.0",
"version": "0.0.0",
"description": "Read CSV from stdin, query with SQL, write CSV to stdout",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/vmvarela/sql-pipe.git"
"url": "git+https://github.com/vmvarela/sql-pipe.git"
},
"homepage": "https://github.com/vmvarela/sql-pipe",
"bugs": "https://github.com/vmvarela/sql-pipe/issues",
Expand All @@ -22,4 +22,4 @@
"csv", "sql", "cli", "sqlite", "etl", "data"
],
"author": "vmvarela <vmvarela@gmail.com>"
}
}
Loading