Skip to content

chore(release): publish packages #47

chore(release): publish packages

chore(release): publish packages #47

Workflow file for this run

# This triggers whenever a tagged release is pushed
name: Compile Assets and Create Draft Release
on:
push:
tags:
- 'powersync-v[0-9]+.[0-9]+.[0-9]+'
jobs:
setup:
uses: ./.github/workflows/prepare_wasm.yml
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- name: Create Draft Release
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
tag="${{ github.ref_name }}"
version="${tag#powersync-v}"
changes=$(awk "/## $version/{flag=1;next}/##/{flag=0}flag" packages/powersync/CHANGELOG.md)
body="Release $tag
$changes"
gh release create "$tag" --title "$tag" --notes "$body"
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: pnpm/action-setup@v2
name: Install pnpm
with:
run_install: false
version: 10
- name: Publish npm package with WASM files
working-directory: packages/sqlite3_wasm_build
run: |
pnpm i
npm version --allow-same-version --no-git-tag-version $(echo $GITHUB_REF_NAME | sed -E 's/powersync-v//')
pnpm publish --no-git-checks --access public
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}