Skip to content

Fix comment

Fix comment #27

Workflow file for this run

# This triggers whenever a tagged release is pushed
name: Release packages
on:
push:
tags:
- 'sqlite_async-v[0-9]+.[0-9]+.[0-9]+*'
- 'drift_sqlite_async-v[0-9]+.[0-9]+.[0-9]+*'
jobs:
gh_release:
runs-on: ubuntu-latest
if: "${{ startsWith(github.ref_name, 'sqlite_async-') }}"
permissions:
contents: write # Needed to create releases
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Need to fetch the tags
- uses: dart-lang/setup-dart@v1
- name: Compile web worker
run: |
dart pub get
dart compile js -O4 --no-source-maps -Dsqlite3.dartbigints=false -o assets/db_worker.js packages/sqlite_async/lib/src/web/worker/worker.dart
- name: Set tag name
id: tag
run: |
tag=$(basename "${{ github.ref }}")
echo "tag=$tag" >> $GITHUB_OUTPUT
- name: Create Release
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
tag="${{ steps.tag.outputs.tag }}"
body="Release $tag"
gh release create --draft "$tag" --title "$tag" --notes "$body"
- name: Upload Worker
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
gh release upload "${{ steps.tag.outputs.tag }}" assets/db_worker.js
publish_sqlite_async:
permissions:
id-token: write
if: "${{ startsWith(github.ref_name, 'sqlite_async-') }}"
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
with:
working-directory: packages/sqlite_async/
publish_drift_sqlite_async:
permissions:
id-token: write
if: "${{ startsWith(github.ref_name, 'drift_sqlite_async-') }}"
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
with:
working-directory: packages/drift_sqlite_async/