Skip to content

Commit 8da93ab

Browse files
committed
Merge
2 parents f722a0f + 70e63c9 commit 8da93ab

File tree

5 files changed

+68
-31
lines changed

5 files changed

+68
-31
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
name: ci
1+
name: Checks
22

3-
on: [push, pull_request, release]
3+
on:
4+
pull_request:
5+
branches:
6+
- main
47

58
jobs:
69
code_quality:

.github/workflows/publish_jsr.yml

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,34 @@ jobs:
1111
timeout-minutes: 30
1212

1313
permissions:
14-
contents: read
14+
contents: write
1515
id-token: write
1616

1717
steps:
18-
- name: Clone repository
18+
- name: Checkout repository
1919
uses: actions/checkout@v4
2020
with:
21-
submodules: true
21+
fetch-depth: 0
2222

2323
- name: Set up Deno
2424
uses: denoland/setup-deno@v1
2525
with:
2626
deno-version: v2.x
2727

28+
- name: Extract version from deno.json
29+
id: get_version
30+
run: |
31+
VERSION=$(jq -r .version < deno.json)
32+
echo "version=$VERSION" >> $GITHUB_OUTPUT
33+
34+
- name: Check if version tag already exists
35+
run: |
36+
TAG="v${{ steps.get_version.outputs.version }}"
37+
if git rev-parse "$TAG" >/dev/null 2>&1; then
38+
echo "🚫 Tag $TAG already exists. Aborting."
39+
exit 1
40+
fi
41+
2842
- name: Check Format
2943
run: deno fmt --check
3044

@@ -43,10 +57,20 @@ jobs:
4357
- name: Run doc tests
4458
run: docker compose run doc_tests
4559

46-
- name: Publish (dry run)
47-
if: startsWith(github.ref, 'refs/tags/') == false
48-
run: deno publish --dry-run --allow-dirty
60+
- name: Create tag for release
61+
run: |
62+
TAG="v${{ steps.get_version.outputs.version }}"
63+
git config user.name "github-actions"
64+
git config user.email "github-actions@users.noreply.github.com"
65+
git tag "$TAG"
66+
git push origin "$TAG"
67+
68+
- name: Create GitHub Release
69+
run: |
70+
gh release create "v${{ steps.get_version.outputs.version }}" \
71+
--title "v${{ steps.get_version.outputs.version }}"
72+
env:
73+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4974

50-
- name: Publish (real)
51-
if: startsWith(github.ref, 'refs/tags/')
52-
run: deno publish --allow-dirty
75+
- name: Publish package
76+
run: deno publish

README.md

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,34 @@
1+
<div align="center">
2+
13
# deno-postgres
24

5+
<img src="./docs/deno-postgres.png" width="164" style="padding-bottom:20px;" />
6+
</div>
7+
8+
<div align="center">
9+
310
![Build Status](https://img.shields.io/github/actions/workflow/status/denodrivers/postgres/ci.yml?branch=main&label=Build&logo=github&style=flat-square)
4-
[![Discord server](https://img.shields.io/discord/768918486575480863?color=blue&label=Ask%20for%20help%20here&logo=discord&style=flat-square)](https://discord.gg/sCNaAvQeEa)
11+
[![Discord server](https://img.shields.io/discord/768918486575480863?color=blue&label=Join%20us&logo=discord&style=flat-square)](https://discord.com/invite/HEdTCvZUSf)
512
[![JSR](https://jsr.io/badges/@db/postgres?style=flat-square)](https://jsr.io/@db/postgres)
613
[![JSR Score](https://jsr.io/badges/@db/postgres/score?style=flat-square)](https://jsr.io/@db/postgres)
714
[![Manual](https://img.shields.io/github/v/release/denodrivers/postgres?color=orange&label=Manual&logo=deno&style=flat-square)](https://deno-postgres.com)
815
[![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)
916
[![License](https://img.shields.io/github/license/denodrivers/postgres?color=yellowgreen&label=License&style=flat-square)](LICENSE)
1017

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

23+
</div>
24+
1725
## Documentation
1826

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

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

2533
## Examples
2634

@@ -70,24 +78,26 @@ alongside the driver.
7078

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

73-
| Deno version | Min driver version | Max version | Note |
74-
| ------------- | ------------------ | ------------------- | ------------------------------------------------------------------------------ |
75-
| 1.8.x | 0.5.0 | 0.10.0 | |
76-
| 1.9.0 | 0.11.0 | 0.11.1 | |
77-
| 1.9.1 and up | 0.11.2 | 0.11.3 | |
78-
| 1.11.0 and up | 0.12.0 | 0.12.0 | |
79-
| 1.14.0 and up | 0.13.0 | 0.13.0 | |
80-
| 1.16.0 | 0.14.0 | 0.14.3 | |
81-
| 1.17.0 | 0.15.0 | 0.17.1 | |
82-
| 1.40.0 | 0.17.2 | currently supported | 0.17.2 [on JSR](https://jsr.io/@bartlomieju/postgres) |
83-
| 2.0.0 and up | 0.19.4 | currently supported | All versions available as [`@db/postgres` on JSR](https://jsr.io/@db/postgres) |
81+
| Deno version | Min driver version | Max version | Note |
82+
| ------------- | ------------------ | ----------- | -------------------------------------------------------------------------- |
83+
| 1.8.x | 0.5.0 | 0.10.0 | |
84+
| 1.9.0 | 0.11.0 | 0.11.1 | |
85+
| 1.9.1 and up | 0.11.2 | 0.11.3 | |
86+
| 1.11.0 and up | 0.12.0 | 0.12.0 | |
87+
| 1.14.0 and up | 0.13.0 | 0.13.0 | |
88+
| 1.16.0 | 0.14.0 | 0.14.3 | |
89+
| 1.17.0 | 0.15.0 | 0.17.1 | |
90+
| 1.40.0 | 0.17.2 | 0.19.3 | 0.19.3 and down are available in [deno.land](https://deno.land/x/postgres) |
91+
| 2.0.0 and up | 0.19.4 | - | Available on JSR! [`@db/postgres`](https://jsr.io/@db/postgres) |
8492

8593
## Breaking changes
8694

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

92102
## Found issues?
93103

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# deno-postgres
22

33
![Build Status](https://img.shields.io/github/actions/workflow/status/denodrivers/postgres/ci.yml?branch=main&label=Build&logo=github&style=flat-square)
4-
[![Discord server](https://img.shields.io/discord/768918486575480863?color=blue&label=Ask%20for%20help%20here&logo=discord&style=flat-square)](https://discord.gg/sCNaAvQeEa)
4+
[![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)
55
[![JSR](https://jsr.io/badges/@db/postgres?style=flat-square)](https://jsr.io/@db/postgres)
66
[![JSR Score](https://jsr.io/badges/@db/postgres/score?style=flat-square)](https://jsr.io/@db/postgres)
77
[![Manual](https://img.shields.io/github/v/release/denodrivers/postgres?color=orange&label=Manual&logo=deno&style=flat-square)](https://deno-postgres.com)

docs/deno-postgres.png

658 KB
Loading

0 commit comments

Comments
 (0)