Skip to content

Commit

Permalink
Add pgxn-releas workflow
Browse files Browse the repository at this point in the history
Add dependencies and other data to `META.json`, and add `.gitattributes`
so that `git archive` excludes files not needed in the release archive.
  • Loading branch information
theory committed Mar 14, 2024
1 parent 3372714 commit f317b8a
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 12 deletions.
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"
]
}
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

0 comments on commit f317b8a

Please sign in to comment.