Skip to content

Commit 98eb6aa

Browse files
committed
build: add workflow to publish to PGXN
Signed-off-by: Snehil Shah <snehilshah.989@gmail.com>
1 parent 5e372ef commit 98eb6aa

File tree

6 files changed

+42
-11
lines changed

6 files changed

+42
-11
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/checkout@v4
1818

1919
- name: Update docs
20-
run: bash scripts/update-docs.sh
20+
run: make docs
2121

2222
- name: Configure Git
2323
run: |

.github/workflows/publish.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,23 @@ jobs:
3737
- name: Publish to database.dev
3838
run: dbdev publish
3939

40+
pgxn:
41+
name: PGXN
42+
runs-on: ubuntu-latest
43+
container: pgxn/pgxn-tools
44+
steps:
45+
- name: Checkout repository
46+
uses: actions/checkout@v4
47+
48+
- name: Bundle the Release
49+
run: pgxn-bundle
50+
51+
- name: Publish to PGXN
52+
env:
53+
PGXN_USERNAME: ${{ secrets.PGXN_USERNAME }}
54+
PGXN_PASSWORD: ${{ secrets.PGXN_PASSWORD }}
55+
run: pgxn-release
56+
4057
github:
4158
name: GitHub
4259
runs-on: ubuntu-latest
@@ -131,7 +148,9 @@ jobs:
131148
body: |
132149
Release of `pg_dispatch` version ${{ steps.version.outputs.version }}.
133150
134-
Go to [database.dev](https://database.dev/Snehil_Shah/pg_dispatch) for the latest installation.
151+
Find the official distributions from:
152+
- [database.dev](https://database.dev/Snehil_Shah/pg_dispatch)
153+
- [PGXN](https://pgxn.org/dist/pg_dispatch)
135154
136155
## Changes
137156
${{ steps.changelog.outputs.changelog }}

META.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
{
22
"name": "pg_dispatch",
33
"abstract": "Asynchronous SQL dispatcher",
4-
"version": "0.1.2",
4+
"description": "A TLE compliant asynchronous SQL dispatcher, allowing you to run SQL queries asynchronously.",
5+
"version": "0.1.3",
56
"maintainer": "Snehil Shah <snehilshah.989@gmail.com>",
67
"license": "postgresql",
78
"provides": {
89
"pg_dispatch": {
910
"abstract": "Asynchronous SQL dispatcher",
10-
"file": "pg_dispatch--0.1.2.sql",
11+
"file": "pg_dispatch--0.1.3.sql",
1112
"docfile": "README.md",
12-
"version": "0.1.2"
13+
"version": "0.1.3"
14+
}
15+
},
16+
"prereqs": {
17+
"runtime": {
18+
"requires": {
19+
"PostgreSQL": ">= 13.0.0",
20+
"pg_cron": ">= 1.5.0"
21+
}
1322
}
1423
},
1524
"resources": {

Makefile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
EXTENSION = pg_dispatch
2-
EXTVERSION = 0.1.2
3-
DATA = pg_dispatch--0.1.2.sql
2+
EXTVERSION = 0.1.3
3+
DATA = pg_dispatch--0.1.3.sql
44

55
PG_CONFIG ?= pg_config
66
PGXS := $(shell $(PG_CONFIG) --pgxs)
77
include $(PGXS)
88

9-
.PHONY: dist
9+
.PHONY: dist docs
1010
dist:
11-
mkdir -p dist
12-
git archive --format zip --prefix=$(EXTENSION)-$(EXTVERSION)/ -o dist/$(EXTENSION)-$(EXTVERSION).zip HEAD
11+
mkdir -p dist
12+
git archive --format zip --prefix=$(EXTENSION)-$(EXTVERSION)/ -o dist/$(EXTENSION)-$(EXTVERSION).zip HEAD
13+
14+
docs:
15+
bash scripts/update-docs.sh

pg_dispatch.control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Ref: https://www.postgresql.org/docs/current/extend-extensions.html#EXTEND-EXTENSIONS-FILES
22

33
comment = 'Asynchronous SQL dispatcher'
4-
default_version = '0.1.2'
4+
default_version = '0.1.3'
55
relocatable = false
66
requires = 'pgcrypto, pg_cron'
77
superuser = false

0 commit comments

Comments
 (0)