-
Notifications
You must be signed in to change notification settings - Fork 5
64 lines (51 loc) · 1.74 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: build/deploy
on:
pull_request:
push:
branches:
- "*"
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
container: debian:bookworm
steps:
- name: install aux deps
run: apt update && apt -y --no-install-recommends install git ca-certificates curl gpg make
- name: add pgdg pkg repo
run: >
echo "deb [arch=amd64] http://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" >> /etc/apt/sources.list.d/pgdg.list &&
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg
- run: apt update && apt -y --no-install-recommends install postgresql-server-dev-all
- uses: actions/checkout@v4
- name: generate debian/control
run: pg_buildext updatecontrol && make -f debian/rules debian/control
- name: install build deps
run: apt -y --no-install-recommends build-dep .
- name: build package
run: make deb
- name: mv *.deb to the cwd
run: mv ../*.deb .
- uses: actions/upload-artifact@v3
with:
name: pkg
path: '*.deb'
retention-days: 1
deploy:
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
container: debian:bookworm
steps:
- name: install curl
run: apt update && apt -y --no-install-recommends install curl ca-certificates
- name: clone yeti-pg-ext repo for ci/deploy.sh
uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: pkg
- name: upload pkg to the bookworm 1.13
run: ci/deploy.sh bookworm 1.13 main *.deb
env:
PKG_API_BASE: ${{secrets.PKG_API_BASE}}