-
Notifications
You must be signed in to change notification settings - Fork 13
125 lines (115 loc) · 3.82 KB
/
release.yaml
File metadata and controls
125 lines (115 loc) · 3.82 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: release
on:
workflow_dispatch:
inputs:
version:
description: Version to release (ex. `0.1.0`)
required: false
type: string
push:
branches:
# Run on all commits to main, because GitHub somehow doesn't support only specifying tag patterns
# (filtering must be done at the per-job level with an `if`)
- main
# Run on auto-generated release PRs
- prep-release-v[0-9]+\.[0-9]+\.[0-9]+
tags:
# Run on released tags (created by automated post-merge release-tagging), to generate the actual release
- v[0-9]+\.[0-9]+\.[0-9]+
concurrency:
group: release
jobs:
build-rpm:
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/prep-release-v') }}
strategy:
matrix:
config:
- pgrx:
pg-version: pg15
pg:
version: "15.14"
- pgrx:
pg-version: pg16
pg:
version: "16.10"
- pgrx:
pg-version: pg17
pg:
version: "17.6"
- pgrx:
pg-version: pg18
pg:
version: "18.0"
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Build the RPM (reuse workflow)
uses: ./.github/workflows/build-rpm
with:
artifact-upload: true
pgrx-pg-version: ${{ matrix.config.pgrx.pg-version }}
pg-version: ${{ matrix.config.pg.version }}
build-zip:
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/prep-release-v') }}
container:
image: ghcr.io/vadosware/pg_idkit/builder-${{ matrix.libc }}:0.1.x
strategy:
matrix:
libc:
- gnu
- musl
config:
- pgrx:
pg-version: pg15
pg:
version: "15.14"
- pgrx:
pg-version: pg16
pg:
version: "16.10"
- pgrx:
pg-version: pg17
pg:
version: "17.6"
- pgrx:
pg-version: pg18
pg:
version: "18.0"
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Build and test
uses: ./.github/workflows/build-and-test
with:
libc: ${{ matrix.libc }}
artifact-upload: true
artifact-tarball-suffix: "-${{ matrix.config.pgrx.pg-version }}-${{ matrix.libc }}"
pgrx-pg-version: ${{ matrix.config.pgrx.pg-version }}
pkg-pg-version: ${{ matrix.config.pg.version }}
release:
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/prep-release-v') }}
permissions:
contents: write
needs:
- build-rpm
- build-zip
steps:
# Checkout the repository
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
# Download all artifacts
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
path: artifacts
# Create release (pre-release if we're prepping)
- name: Create release
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
with:
prerelease: ${{ startsWith(github.ref, 'refs/heads/prep-release') }}
draft: ${{ startsWith(github.ref, 'refs/heads/prep-release') }}
tag_name: ${{ github.ref_name || inputs.version }}
# NOTE: while we have the CHANGELOG file, it always contains *all* changes,
# so we will use the generated GitHub commits for now
generate_release_notes: true
files: |
./artifacts/*/*