Skip to content
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
35 changes: 26 additions & 9 deletions .github/workflows/main.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
name: build/deploy
name: Release
on:
pull_request:
push:
branches:
- "*"
tags:
- 'v*'
release:
types: [ published ]

jobs:
deb12-build:
runs-on: ubuntu-latest
container: debian:bookworm
steps:

- name: Calculate version from ${{github.ref}}
env:
PKG_TAG: ${{github.ref}}
shell: bash
run: echo "##[set-output name=tag;]$(echo ${PKG_TAG#refs/tags/})"
id: extract_tag

- name: install aux deps
run: apt update && apt -y --no-install-recommends install git ca-certificates curl gpg make

Expand All @@ -24,6 +28,9 @@ jobs:

- uses: actions/checkout@v4

- name: update changelog
run: rm debian/changelog && dch --create --package yeti-pg-ext --newversion "${{steps.extract_tag.outputs.tag}}" --distribution bookworm "Release ${{steps.extract_tag.outputs.tag}}, commit: ${{github.ref}}"

- name: generate debian/control
run: pg_buildext updatecontrol && make -f debian/rules debian/control

Expand Down Expand Up @@ -52,12 +59,19 @@ jobs:
s3_secret_access_key: ${{ secrets.DEB_AWS_SECRET_ACCESS_KEY }}
s3_endpoint_url: ${{ secrets.DEB_AWS_ENDPOINT }}
s3_prefix: '1.14'
if: startsWith(github.ref, 'refs/tags/v')

deb13-build:
runs-on: ubuntu-latest
container: debian:trixie
steps:

- name: Calculate version from ${{github.ref}}
env:
PKG_TAG: ${{github.ref}}
shell: bash
run: echo "##[set-output name=tag;]$(echo ${PKG_TAG#refs/tags/})"
id: extract_tag

- name: install aux deps
run: apt update && apt -y --no-install-recommends install git ca-certificates curl gpg make

Expand All @@ -70,6 +84,9 @@ jobs:

- uses: actions/checkout@v4

- name: update changelog
run: rm debian/changelog && dch --create --package yeti-pg-ext --newversion "${{steps.extract_tag.outputs.tag}}" --distribution trixie "Release ${{steps.extract_tag.outputs.tag}}, commit: ${{github.ref}}"

- name: generate debian/control
run: pg_buildext updatecontrol && make -f debian/rules debian/control

Expand Down Expand Up @@ -98,4 +115,4 @@ jobs:
s3_secret_access_key: ${{ secrets.DEB_AWS_SECRET_ACCESS_KEY }}
s3_endpoint_url: ${{ secrets.DEB_AWS_ENDPOINT }}
s3_prefix: '1.14'
if: startsWith(github.ref, 'refs/tags/v')

75 changes: 75 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Test build
on:
pull_request:
push:
branches: [ master ]

jobs:
deb12-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@v4
with:
name: deb12-pkg
path: '*.deb'
retention-days: 1

deb13-build:
runs-on: ubuntu-latest
container: debian:trixie
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 trixie-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@v4
with:
name: deb13-pkg
path: '*.deb'
retention-days: 1

14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

Loading