Skip to content

Commit

Permalink
chore: add step to publish flight-sql-client packages
Browse files Browse the repository at this point in the history
this currently runs based on commit message which will not cause anything to run, however, until we set up a real NPM_TOKEN and decide how we want to release, this won't be able to publish
  • Loading branch information
dav1do committed Nov 19, 2024
1 parent c67258f commit 26a5b2c
Showing 1 changed file with 45 additions and 1 deletion.
46 changes: 45 additions & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,48 @@ jobs:
shell: bash
- name: Test bindings
working-directory: ${{ env.FLIGHT_SQL_PATH }}
run: pnpm test
run: pnpm test
publish:
name: Publish flight-sql-client
runs-on: ubuntu-latest
needs:
- test-linux-x64-gnu-binding
- test-macOS-binding
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: pnpm install --frozen-lockfile
working-directory: ${{ env.FLIGHT_SQL_PATH }}
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: ${{ env.FLIGHT_SQL_PATH }}/artifacts
- name: Move artifacts
run: pnpm artifacts
working-directory: ${{ env.FLIGHT_SQL_PATH }}
- name: List packages
run: ls -R ./npm
shell: bash
working-directory: ${{ env.FLIGHT_SQL_PATH }}
- name: Publish
working-directory: ${{ env.FLIGHT_SQL_PATH }}
run: |
npm config set provenance true
if git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$";
then
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npm publish --access public
elif git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+";
then
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npm publish --tag next --access public
else
echo "Not a release, skipping publish"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 26a5b2c

Please sign in to comment.