Skip to content

Create release and publish package update #501

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 24, 2025
Merged
Show file tree
Hide file tree
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
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: ci
name: Checks

on: [push, pull_request, release]
on:
pull_request:
branches:
- main

jobs:
code_quality:
Expand Down
42 changes: 33 additions & 9 deletions .github/workflows/publish_jsr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,34 @@ jobs:
timeout-minutes: 30

permissions:
contents: read
contents: write
id-token: write

steps:
- name: Clone repository
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Set up Deno
uses: denoland/setup-deno@v1
with:
deno-version: v2.x

- name: Extract version from deno.json
id: get_version
run: |
VERSION=$(jq -r .version < deno.json)
echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: Check if version tag already exists
run: |
TAG="v${{ steps.get_version.outputs.version }}"
if git rev-parse "$TAG" >/dev/null 2>&1; then
echo "🚫 Tag $TAG already exists. Aborting."
exit 1
fi

- name: Check Format
run: deno fmt --check

Expand All @@ -43,10 +57,20 @@ jobs:
- name: Run doc tests
run: docker compose run doc_tests

- name: Publish (dry run)
if: startsWith(github.ref, 'refs/tags/') == false
run: deno publish --dry-run --allow-dirty
- name: Create tag for release
run: |
TAG="v${{ steps.get_version.outputs.version }}"
git config user.name "github-actions"
git config user.email "[email protected]"
git tag "$TAG"
git push origin "$TAG"

- name: Create GitHub Release
run: |
gh release create "v${{ steps.get_version.outputs.version }}" \
--title "v${{ steps.get_version.outputs.version }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish (real)
if: startsWith(github.ref, 'refs/tags/')
run: deno publish --allow-dirty
- name: Publish package
run: deno publish
48 changes: 29 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,34 @@
<div align="center">

# deno-postgres

<img src="./docs/deno-postgres.png" width="164" style="padding-bottom:20px;" />
</div>

<div align="center">

![Build Status](https://img.shields.io/github/actions/workflow/status/denodrivers/postgres/ci.yml?branch=main&label=Build&logo=github&style=flat-square)
[![Discord server](https://img.shields.io/discord/768918486575480863?color=blue&label=Ask%20for%20help%20here&logo=discord&style=flat-square)](https://discord.gg/HEdTCvZUSf)
[![Discord server](https://img.shields.io/discord/768918486575480863?color=blue&label=Join%20us&logo=discord&style=flat-square)](https://discord.com/invite/HEdTCvZUSf)
[![JSR](https://jsr.io/badges/@db/postgres?style=flat-square)](https://jsr.io/@db/postgres)
[![JSR Score](https://jsr.io/badges/@db/postgres/score?style=flat-square)](https://jsr.io/@db/postgres)
[![Manual](https://img.shields.io/github/v/release/denodrivers/postgres?color=orange&label=Manual&logo=deno&style=flat-square)](https://deno-postgres.com)
[![Documentation](https://img.shields.io/github/v/release/denodrivers/postgres?color=yellow&label=Documentation&logo=deno&style=flat-square)](https://jsr.io/@db/postgres/doc)
[![License](https://img.shields.io/github/license/denodrivers/postgres?color=yellowgreen&label=License&style=flat-square)](LICENSE)

A lightweight PostgreSQL driver for Deno focused on developer experience.

A lightweight PostgreSQL driver for Deno focused on developer experience.\
`deno-postgres` is inspired by the excellent work of
[node-postgres](https://github.com/brianc/node-postgres) and
[pq](https://github.com/lib/pq).

</div>

## Documentation

The documentation is available on the
[`deno-postgres` website](https://deno-postgres.com/).
[`deno-postgres`](https://deno-postgres.com/) website.

Join the [Discord](https://discord.gg/HEdTCvZUSf) as well! It's a good place to
discuss bugs and features before opening issues.
Join the [Discord](https://discord.com/invite/HEdTCvZUSf) as well! It's a good
place to discuss bugs and features before opening issues.

## Examples

Expand Down Expand Up @@ -70,24 +78,26 @@ alongside the driver.

This situation will stabilize as `deno-postgres` approach version 1.0.

| Deno version | Min driver version | Max version | Note |
| ------------- | ------------------ | ------------------- | ------------------------------------------------------------------------------ |
| 1.8.x | 0.5.0 | 0.10.0 | |
| 1.9.0 | 0.11.0 | 0.11.1 | |
| 1.9.1 and up | 0.11.2 | 0.11.3 | |
| 1.11.0 and up | 0.12.0 | 0.12.0 | |
| 1.14.0 and up | 0.13.0 | 0.13.0 | |
| 1.16.0 | 0.14.0 | 0.14.3 | |
| 1.17.0 | 0.15.0 | 0.17.1 | |
| 1.40.0 | 0.17.2 | currently supported | 0.17.2 [on JSR](https://jsr.io/@bartlomieju/postgres) |
| 2.0.0 and up | 0.19.4 | currently supported | All versions available as [`@db/postgres` on JSR](https://jsr.io/@db/postgres) |
| Deno version | Min driver version | Max version | Note |
| ------------- | ------------------ | ----------- | -------------------------------------------------------------------------- |
| 1.8.x | 0.5.0 | 0.10.0 | |
| 1.9.0 | 0.11.0 | 0.11.1 | |
| 1.9.1 and up | 0.11.2 | 0.11.3 | |
| 1.11.0 and up | 0.12.0 | 0.12.0 | |
| 1.14.0 and up | 0.13.0 | 0.13.0 | |
| 1.16.0 | 0.14.0 | 0.14.3 | |
| 1.17.0 | 0.15.0 | 0.17.1 | |
| 1.40.0 | 0.17.2 | 0.19.3 | 0.19.3 and down are available in [deno.land](https://deno.land/x/postgres) |
| 2.0.0 and up | 0.19.4 | - | Available on JSR! [`@db/postgres`](https://jsr.io/@db/postgres) |

## Breaking changes

Although `deno-postgres` is reasonably stable and robust, it is a WIP, and we're
still exploring the design. Expect some breaking changes as we reach version 1.0
and enhance the feature set. Please check the Releases for more info on breaking
changes. Please reach out if there are any undocumented breaking changes.
and enhance the feature set. Please check the
[Releases](https://github.com/denodrivers/postgres/releases) for more info on
breaking changes. Please reach out if there are any undocumented breaking
changes.

## Found issues?

Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# deno-postgres

![Build Status](https://img.shields.io/github/actions/workflow/status/denodrivers/postgres/ci.yml?branch=main&label=Build&logo=github&style=flat-square)
[![Discord server](https://img.shields.io/discord/768918486575480863?color=blue&label=Ask%20for%20help%20here&logo=discord&style=flat-square)](https://discord.gg/HEdTCvZUSf)
[![Discord server](https://img.shields.io/discord/768918486575480863?color=blue&label=Ask%20for%20help%20here&logo=discord&style=flat-square)](https://discord.com/invite/HEdTCvZUSf)
[![JSR](https://jsr.io/badges/@db/postgres?style=flat-square)](https://jsr.io/@db/postgres)
[![JSR Score](https://jsr.io/badges/@db/postgres/score?style=flat-square)](https://jsr.io/@db/postgres)
[![Manual](https://img.shields.io/github/v/release/denodrivers/postgres?color=orange&label=Manual&logo=deno&style=flat-square)](https://deno-postgres.com)
Expand Down
Binary file added docs/deno-postgres.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.