Skip to content

Commit 784c345

Browse files
committed
Add workflow to publish deb packages
1 parent 590ec0d commit 784c345

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Publish pg_tracing (Ubuntu)
2+
# Build and publish the pg_tracing extension as .deb to GitHub Releases.
3+
4+
name: Publish pg_tracing (Ubuntu)
5+
6+
permissions:
7+
id-token: write
8+
attestations: write
9+
contents: write
10+
11+
on:
12+
push:
13+
tags:
14+
- "v*"
15+
workflow_dispatch:
16+
inputs:
17+
ext_version:
18+
description: "The version to set for the pg_tracing release. This publishes the latest commit of the chosen branch and uploads it to the pre-existing GitHub Release of the provided version."
19+
required: true
20+
default: ""
21+
22+
jobs:
23+
publish-pg_tracing:
24+
name: Publish pg_tracing for PostgreSQL ${{ matrix.PG_VERSION }}
25+
runs-on: ${{ matrix.OS }}
26+
arch: ${{ matrix.ARCH }}
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
PG_VERSION: [14, 15, 16, 17]
31+
OS: [ubuntu-latest]
32+
ARCH: [arm64]
33+
34+
steps:
35+
- name: Checkout Git Repository
36+
uses: actions/checkout@v4
37+
with:
38+
fetch-depth: 0
39+
40+
- name: Set up QEMU
41+
uses: docker/setup-qemu-action@v3
42+
43+
- name: Retrieve Tag Version
44+
id: retrieve_version
45+
run: |
46+
if [ -n "${{ github.event.inputs.ext_version }}" ]; then
47+
EXT_VERSION=${{ github.event.inputs.ext_version }}
48+
echo "ext_version=$EXT_VERSION" >> $GITHUB_OUTPUT
49+
fi
50+
51+
- name: Create deb Package
52+
run: EXT_VERSION=${{ steps.retrieve_version.outputs.ext_version }} PG_VERSION=${{ matrix.PG_VERSION }} make packages
53+
54+
- name: Sign and Attest Build Provenance
55+
uses: actions/attest-build-provenance@v2
56+
with:
57+
subject-path: |
58+
./postgresql-$(matrix.PG_VERSION)-pg-tracing_${{ steps.retrieve_version.outputs.ext_version }}_${{ matrix.ARCH }}.deb

0 commit comments

Comments
 (0)