Skip to content
Open
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 @@ -6,6 +6,11 @@ on:
tags:
- 'powersync-v[0-9]+.[0-9]+.[0-9]+'

# For trusted npm publishing, see https://docs.npmjs.com/trusted-publishers#github-actions-configuration
permissions:
id-token: write
contents: read

jobs:
setup:
uses: ./.github/workflows/prepare_wasm.yml
Expand All @@ -17,7 +22,7 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- uses: ./.github/actions/prepare

- name: Create Draft Release
Expand All @@ -34,15 +39,18 @@ jobs:
gh release upload "${{ github.ref_name }}" packages/powersync/assets/powersync_db.worker.js packages/powersync/assets/powersync_sync.worker.js packages/sqlite3_wasm_build/dist/*.wasm

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: latest
- name: Update npm
run: |
npm install -g npm@latest
npm --version
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
run_install: false
version: 10
- name: Add NPM auth
run: |
echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" >> ~/.npmrc
- name: Publish npm package with WASM files
working-directory: packages/sqlite3_wasm_build
run: |
Expand All @@ -51,4 +59,3 @@ jobs:
pnpm publish --no-git-checks --access public
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}