Skip to content

Commit 5826d48

Browse files
authored
Merge pull request #23 from dutow/builtpkg
Uploading pgdg binary package
2 parents dfb14c6 + a681221 commit 5826d48

File tree

2 files changed

+67
-2
lines changed

2 files changed

+67
-2
lines changed

.github/workflows/postgresql-16-pgdg-package-pgxs.yml

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: postgresql-16-pgdg-package-pgxs
2-
on: [pull_request, workflow_dispatch]
2+
on:
3+
pull_request:
4+
workflow_dispatch:
5+
push:
6+
branches: [main]
37

48
jobs:
59
build:
@@ -49,3 +53,57 @@ jobs:
4953
sudo -u postgres bash -c 'make USE_PGXS=1'
5054
sudo make USE_PGXS=1 install
5155
working-directory: src/postgres-tde-ext
56+
57+
- name: Create release directory
58+
run: |
59+
sudo mkdir pgtde-pgdg16
60+
sudo mkdir -p pgtde-pgdg16/usr/lib/postgresql/16/lib/
61+
sudo mkdir -p pgtde-pgdg16/share/postgresql/16/extension/
62+
sudo cp /usr/share/postgresql/16/extension/pg_tde* pgtde-pgdg16/share/postgresql/16/extension/
63+
sudo cp /usr/lib/postgresql/16/lib/pg_tde* pgtde-pgdg16/usr/lib/postgresql/16/lib/
64+
65+
- name: Upload tgz
66+
uses: actions/upload-artifact@v3
67+
with:
68+
name: pg_tde_pgdg16_binary
69+
path: pgtde-pgdg16
70+
71+
- name: Create deb
72+
run: |
73+
sudo mkdir pgtde-pgdg16/DEBIAN
74+
sudo sh -c 'echo "Package: pgtde-pgdg16" > pgtde-pgdg16/DEBIAN/control'
75+
sudo sh -c 'echo "Version: 0.1" >> pgtde-pgdg16/DEBIAN/control'
76+
sudo sh -c 'echo "Architecture: amd64" >> pgtde-pgdg16/DEBIAN/control'
77+
sudo sh -c 'echo "Maintainer: Percona" >> pgtde-pgdg16/DEBIAN/control'
78+
sudo sh -c 'echo "Description: Experimental pg_tde extension" >> pgtde-pgdg16/DEBIAN/control'
79+
sudo dpkg-deb --build --root-owner-group pgtde-pgdg16
80+
81+
- name: Test deb
82+
run: |
83+
sudo rm -rf /usr/share/postgresql/16/extension/pg_tde*
84+
sudo rm -rf /usr/lib/postgresql/16/lib/pg_tde*
85+
sudo dpkg -i --debug=7777 pgtde-pgdg16.deb
86+
87+
- name: Upload deb
88+
uses: actions/upload-artifact@v3
89+
with:
90+
name: pg_tde_deb
91+
path: pgtde-pgdg16.deb
92+
93+
- name: Create tgz
94+
run: |
95+
cd pgtde-pgdg16 && sudo tar -czvf ../pgtde-pgdg16.tar.gz .
96+
97+
- name: Publish release
98+
uses: ncipollo/release-action@v1
99+
# Only try and deploy on merged code
100+
if: "github.repository == 'Percona-Lab/postgres-tde-ext' && github.ref_name == 'main' && (github.event_name == 'push' || github.event_name == 'schedule')"
101+
with:
102+
artifacts: "pgtde-pgdg16.tar.gz,pgtde-pgdg16.deb"
103+
omitBody: true
104+
allowUpdates: true
105+
generateReleaseNotes: true
106+
makeLatest: true
107+
tag: "latest"
108+
name: "HEAD"
109+
replacesArtifacts: true

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,16 @@
22

33
This is an experimental encrypted access method for Postgres 16.
44

5+
## Latest test release
6+
7+
To download the latest build of the main branch, use the `HEAD` release from [releases](https://github.com/Percona-Lab/postgres-tde-ext/releases).
8+
9+
Builds are available in a tar.gz format, containing only the required files, and as a deb package.
10+
The deb package is built againts the pgdg16 release, but this dependency is not yet enforced in the package.
11+
512
## Installation steps
613

7-
1. Build and install the plugin either with make or meson (see build steps)
14+
1. Build and install the plugin either with make or meson (see build steps), or download a release
815
2. Add pg_tde to the preload libraries: `ALTER SYSTEM SET shared_preload_libraries = 'pg_tde';`
916
3. Restart the postgres server
1017
4. Create the extension: `CREATE EXTENSION pg_tde;`

0 commit comments

Comments
 (0)