Skip to content
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

Add pgxn-release workflow #3

Merged
merged 1 commit into from
Mar 14, 2024
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
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.gitignore export-ignore
.gitattributes export-ignore
.github export-ignore
20 changes: 20 additions & 0 deletions .github/workflows/pgxn-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: ⚙️ Release on PGXN
on:
push:
# Release on semantic version tag.
tags: ['v[0-9]+.[0-9]+.[0-9]+']
jobs:
release:
name: Release on PGXN
runs-on: ubuntu-latest
container: pgxn/pgxn-tools
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Bundle the Release
run: pgxn-bundle
- name: Release on PGXN
env:
PGXN_USERNAME: ${{ secrets.PGXN_USERNAME }}
PGXN_PASSWORD: ${{ secrets.PGXN_PASSWORD }}
run: pgxn-release
48 changes: 37 additions & 11 deletions META.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,45 @@
"description": "Convenience API for Tembo time series stack",
"version": "0.1.1",
"maintainer": [
"Jason Petersen <[email protected]>"
"Jason Petersen <[email protected]>"
],
"license": "mit",
"provides": {
"timeseries": {
"abstract": "Convenience API for Tembo time series stack",
"file": "sql/timeseries.sql",
"docfile": "doc/timeseries.md",
"version": "0.1.1"
}
"timeseries": {
"abstract": "Convenience API for Tembo time series stack",
"file": "sql/timeseries.sql",
"docfile": "doc/timeseries.md",
"version": "0.1.1"
}
},
"prereqs": {
"runtime": {
"requires": {
"PostgreSQL": "14.0.0"
},
"recommends": {
"pg_partman": "4.5.1"
}
}
},
"resources": {
"bugtracker": {
"web": "https://github.com/tembo-io/pg_timeseries/issues/"
},
"repository": {
"url": "git://github.com/tembo-io/pg_timeseries.git",
"web": "https://github.com/tembo-io/pg_timeseries/",
"type": "git"
}
},
"generated_by": "Jason Petersen",
"meta-spec": {
"version": "1.0.0",
"url": "https://pgxn.org/meta/spec.txt"
}
}
"version": "1.0.0",
"url": "https://pgxn.org/meta/spec.txt"
},
"tags": [
"time series",
"partition",
"retention"
]
}
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
EXTENSION = $(shell grep -m 1 '"name":' META.json | \
sed -e 's/[[:space:]]*"name":[[:space:]]*"\([^"]*\)",/\1/')
EXTVERSION = $(shell grep -m 1 '[[:space:]]\{8\}"version":' META.json | \
EXTVERSION = $(shell grep -m 1 '[[:space:]]\{6\}"version":' META.json | \
sed -e 's/[[:space:]]*"version":[[:space:]]*"\([^"]*\)",\{0,1\}/\1/')
DISTVERSION = $(shell grep -m 1 '[[:space:]]\{3\}"version":' META.json | \
sed -e 's/[[:space:]]*"version":[[:space:]]*"\([^"]*\)",\{0,1\}/\1/')

EXTVERSIONS = 0.1.0 0.1.1

DATA = $(wildcard sql/*--*.sql)
DATA_built = $(foreach v,$(EXTVERSIONS),sql/$(EXTENSION)--$(v).sql)
DATA_built = $(foreach v,$(EXTVERSIONS),sql/$(EXTENSION)--$(v).sql)

DOCS = $(wildcard doc/*.md)
TESTS = $(wildcard test/sql/*.sql)
Expand Down
2 changes: 1 addition & 1 deletion doc/timeseries.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SELECT enable_ts_table('sensor_readings');

With this one call, several things will happen:

* The table will be restructred as a series of partitions using PostgreSQL's [native PARTITION features](https://www.postgresql.org/docs/current/ddl-partitioning.html)
* The table will be restructured as a series of partitions using PostgreSQL's [native PARTITION features](https://www.postgresql.org/docs/current/ddl-partitioning.html)
* Each partition covers a particular range of time (one week by default)
* New partitions will be created for some time in the future (one month by default)
* Once an hour, a maintenance job will create any missing partitions as well as needed future ones
Expand Down
Loading