Skip thread sanitizer tests #51
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish to pub.dev | |
| on: | |
| push: | |
| tags: | |
| - 'sqlite3-[0-9]+.[0-9]+.[0-9]+*' | |
| - 'sqlite3_test-[0-9]+.[0-9]+.[0-9]+*' | |
| - 'sqlite3_web-[0-9]+.[0-9]+.[0-9]+*' | |
| - 'sqlite3_connection_pool-[0-9]+.[0-9]+.[0-9]+*' | |
| - 'sqlite3_web_js-[0-9]+.[0-9]+.[0-9]+*' | |
| permissions: {} | |
| jobs: | |
| fetch_sqlite: | |
| uses: ./.github/workflows/compile_sqlite.yml | |
| prepare_release: | |
| needs: [fetch_sqlite] | |
| permissions: | |
| packages: write # Needed to upload release assets | |
| contents: write # Needed to upload release assets | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: dart-lang/setup-dart@v1 | |
| - name: Pub get | |
| run: dart pub get | |
| - name: Download compiled sqlite3 | |
| uses: actions/download-artifact@v8 | |
| with: | |
| github-token: ${{ github.token }} | |
| artifact-ids: ${{ needs.fetch_sqlite.outputs.artifact_id }} | |
| path: sqlite-compiled | |
| - name: Set tag name | |
| if: "${{ startsWith(github.ref_name, 'sqlite3-') }}" | |
| id: tag | |
| run: | | |
| tag=$(basename "${GITHUB_REF}") | |
| echo "tag=$tag" >> $GITHUB_OUTPUT | |
| - name: Verify asset hashes | |
| if: "${{ startsWith(github.ref_name, 'sqlite3-') }}" | |
| run: dart run tool/write_asset_hashes.dart "${STEPS_TAG_OUTPUTS_TAG}" | |
| env: | |
| STEPS_TAG_OUTPUTS_TAG: ${{ steps.tag.outputs.tag }} | |
| - name: List libraries | |
| run: ls -al sqlite-compiled | |
| - name: Create Release | |
| if: "${{ startsWith(github.ref_name, 'sqlite3-') }}" | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| STEPS_TAG_OUTPUTS_TAG: ${{ steps.tag.outputs.tag }} | |
| run: | | |
| tag="${STEPS_TAG_OUTPUTS_TAG}" | |
| body="Pending release for $tag" | |
| gh release create --draft "$tag" --title "$tag" --notes "$body" | |
| gh release upload "$tag" sqlite-compiled/* | |
| publish_sqlite3: | |
| needs: [prepare_release] | |
| permissions: | |
| id-token: write # Needed to create OIDC token for pub.dev | |
| if: "${{ startsWith(github.ref_name, 'sqlite3-') }}" | |
| uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 | |
| with: | |
| environment: 'pub.dev' | |
| working-directory: sqlite3/ | |
| publish_sqlite3_test: | |
| needs: [prepare_release] | |
| permissions: | |
| id-token: write # Needed to create OIDC token for pub.dev | |
| if: "${{ startsWith(github.ref_name, 'sqlite3_test-') }}" | |
| uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 | |
| with: | |
| environment: 'pub.dev' | |
| working-directory: sqlite3_test/ | |
| publish_sqlite3_web: | |
| needs: [prepare_release] | |
| permissions: | |
| id-token: write # Needed to create OIDC token for pub.dev | |
| if: "${{ startsWith(github.ref_name, 'sqlite3_web-') }}" | |
| uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 | |
| with: | |
| environment: 'pub.dev' | |
| working-directory: sqlite3_web/ | |
| publish_sqlite3_connection_pool: | |
| needs: [fetch_sqlite, prepare_release] | |
| permissions: | |
| id-token: write # Needed to create OIDC token for pub.dev | |
| if: "${{ startsWith(github.ref_name, 'sqlite3_connection_pool-') }}" | |
| runs-on: ubuntu-latest | |
| environment: 'pub.dev' | |
| # This can't use the workflow because we need to download assets to include in | |
| # the package. | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: dart-lang/setup-dart@v1 # This will request an OIDC token for pub.dev | |
| - name: Download connection pool libraries | |
| uses: actions/download-artifact@v8 | |
| with: | |
| artifact-ids: ${{ needs.fetch_sqlite.outputs.pool_libs_artifact_id }} | |
| path: sqlite3_connection_pool/lib/src/precompiled/ | |
| - name: Pub get | |
| run: dart pub get | |
| - name: Publish - dry run | |
| run: dart pub publish --dry-run | |
| working-directory: sqlite3_connection_pool | |
| - name: Publish to pub.dev | |
| run: dart pub publish -f | |
| working-directory: sqlite3_connection_pool | |
| publish_js_package: | |
| needs: [fetch_sqlite] | |
| permissions: | |
| id-token: write # Needed to create OIDC token for npm trusted publishing | |
| if: "${{ startsWith(github.ref_name, 'sqlite3_web_js-') }}" | |
| runs-on: ubuntu-latest | |
| environment: 'npm' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: dart-lang/setup-dart@v1 | |
| - name: Pub get | |
| run: dart pub get | |
| - name: Download compiled sqlite3 | |
| uses: actions/download-artifact@v8 | |
| with: | |
| github-token: ${{ github.token }} | |
| artifact-ids: ${{ needs.fetch_sqlite.outputs.artifact_id }} | |
| path: sqlite-compiled | |
| - name: Copy SQLite libraries | |
| run: | | |
| mkdir sqlite3_web/extra/js-package/assets | |
| cp sqlite-compiled/sqlite3.wasm sqlite3_web/extra/js-package/assets/ | |
| cp sqlite-compiled/sqlite3mc.wasm sqlite3_web/extra/js-package/assets/ | |
| - name: Setup node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: latest | |
| package-manager-cache: false | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | |
| with: | |
| package_json_file: sqlite3_web/extra/js-package/package.json | |
| - name: Build pnpm package | |
| working-directory: sqlite3_web/extra/js-package | |
| run: | | |
| pnpm build:worker | |
| pnpm build | |
| - name: Publish to npmjs.com | |
| working-directory: sqlite3_web/extra/js-package | |
| run: pnpm publish --no-git-checks |