-
Notifications
You must be signed in to change notification settings - Fork 30
45 lines (45 loc) · 1.11 KB
/
publish.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
name: Publish
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
inputs:
git_tag:
required: true
type: string
env:
GIT_TAG: ${{ github.event.inputs.git_tag || github.ref_name }}
jobs:
test:
strategy:
matrix:
pg: [16, 15, 14, 13]
runs-on: ubuntu-latest
container: pgxn/pgxn-tools
steps:
- name: Initialize each Postgres version
run: pg-start ${{ matrix.pg }}
- name: Checkout specified tag
uses: actions/checkout@v3
with:
ref: ${{ env.GIT_TAG }}
- name: Test and build extension for Postgres
run: pg-build-test
publish:
needs: test
runs-on: ubuntu-latest
container:
image: pgxn/pgxn-tools
env:
PGXN_USERNAME: ${{ secrets.PGXN_USERNAME }}
PGXN_PASSWORD: ${{ secrets.PGXN_PASSWORD }}
steps:
- name: Checkout specified tag
uses: actions/checkout@v3
with:
ref: ${{ env.GIT_TAG }}
- name: Build the extension bundle
run: pgxn-bundle
- name: Publish the extension to PGXN
run: pgxn-release