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

ci: Add PGXN META.json and release workflow #203

Merged
merged 5 commits into from
Feb 4, 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
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.gitignore export-ignore
.gitattributes export-ignore
.github export-ignore
.markdownlint.yaml export-ignore
.pre-commit-config.yaml export-ignore
META.json.in export-ignore
31 changes: 31 additions & 0 deletions .github/workflows/publish-pg_analytics-pgxn.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# workflows/publish-pg_analytics-pgxn.yml
#
# Publish pg_analytics (PGXN)
# Build and publish the pg_analytics extension to the PostgreSQL Extension Network (PGXN).

name: Publish pg_analytics (PGXN)

on:
push:
tags:
- "v*"
workflow_dispatch:

jobs:
publish-pg_analytics:
name: Publish pg_analytics to PGXN
runs-on: ubuntu-latest
container: pgxn/pgxn-tools

steps:
- name: Checkout Git Repository
uses: actions/checkout@v4

- name: Bundle the Release
run: make dist

- name: Release on PGXN
env:
PGXN_USERNAME: ${{ secrets.PGXN_USERNAME }}
PGXN_PASSWORD: ${{ secrets.PGXN_PASSWORD }}
run: pgxn-release
54 changes: 54 additions & 0 deletions META.json.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"name": "pg_analytics",
"abstract": "DuckDB-powered data lake analytics from Postgres",
"description": "pg_analytics puts DuckDB inside Postgres. With pg_analytics installed, Postgres can query foreign object stores like AWS S3 and table formats like Iceberg or Delta Lake. Queries are pushed down to DuckDB, a high-performance analytical query engine.",
"version": "@CARGO_VERSION@",
"maintainer": [
"ParadeDB <[email protected]>"
],
"license": "postgresql",
"provides": {
"pg_analytics": {
"abstract": "DuckDB-powered data lake analytics from Postgres",
"file": "src/lib.rs",
"docfile": "doc/overview.mdx",
"version": "@CARGO_VERSION@"
}
},
"prereqs": {
"runtime": {
"requires": {
"PostgreSQL": "13.0.0"
}
}
},
"resources": {
"bugtracker": {
"web": "https://github.com/paradedb/pg_analytics/issues/"
},
"repository": {
"url": "git://github.com/paradedb/pg_analytics.git",
"web": "https://github.com/paradedb/pg_analytics/",
"type": "git"
}
},
"generated_by": "David E. Wheeler",
"meta-spec": {
"version": "1.0.0",
"url": "https://pgxn.org/meta/spec.txt"
},
"tags": [
"paradedb",
"analytics",
"big data",
"olap",
"parquet",
"iceberg",
"object storage",
"datalake",
"arrow",
"realtime analytics",
"columnar",
"duckdb"
]
}
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
DISTNAME = $(shell grep -m 1 '^name' Cargo.toml | sed -e 's/[^"]*"\([^"]*\)",\{0,1\}/\1/')
DISTVERSION = $(shell grep -m 1 '^version' Cargo.toml | sed -e 's/[^"]*"\([^"]*\)",\{0,1\}/\1/')

META.json: META.json.in Cargo.toml
@sed "s/@CARGO_VERSION@/$(DISTVERSION)/g" $< > $@

$(DISTNAME)-$(DISTVERSION).zip: META.json
git archive --format zip --prefix $(DISTNAME)-$(DISTVERSION)/ --add-file $< -o $(DISTNAME)-$(DISTVERSION).zip HEAD

dist: $(DISTNAME)-$(DISTVERSION).zip

clean:
@rm -rf META.json $(DISTNAME)-$(DISTVERSION).zip