4
4
workflow_dispatch :
5
5
6
6
jobs :
7
+ meta :
8
+ runs-on : ubuntu-latest
9
+ outputs :
10
+ tag : ${{steps.meta.outputs.tag}}
11
+ steps :
12
+ - name : GetMetadata
13
+ id : meta
14
+ working-directory : ngx-http-auth-jwt-module
15
+ run : |
16
+ set -eu
17
+ tag=$(git describe --tags --abbrev=0)
18
+
19
+ echo "tag=${tag}" >> $GITHUB_OUTPUT
20
+
7
21
build :
8
22
name : " NGINX: ${{ matrix.nginx-version }}; libjwt: ${{ matrix.libjwt-version }}"
23
+ needs : meta
9
24
strategy :
10
25
matrix :
11
26
# NGINX versions to build/test against
12
- nginx-version : ['1.20.2', '1.22.1', '1.24.0', '1.26.2', '1.27.3']
27
+ nginx-version : ['1.20.2'] # , '1.22.1', '1.24.0', '1.26.2', '1.27.3']
13
28
14
29
# The following versions of libjwt are compatible:
15
30
# * v1.0 - v1.12.0
19
34
# * Debian and Ubuntu's repos have v1.10.2
20
35
# * EPEL has v1.12.1
21
36
# This compiles against each version prior to a breaking change and the latest release
22
- libjwt-version : ['1.12.0', '1.14.0', '1.15.3']
37
+ libjwt-version : ['1.12.0'] # , '1.14.0', '1.15.3']
23
38
runs-on : ubuntu-latest
24
39
steps :
25
40
@@ -32,13 +47,10 @@ jobs:
32
47
- name : Get Metadata
33
48
id : meta
34
49
run : |
35
- set -eux
36
- cd ngx-http-auth-jwt-module
37
-
38
- tag=$(git describe --tags --abbrev=0)
39
-
50
+ set -eu
40
51
echo "filename=ngx-http-auth-jwt-module-${tag}_libjwt-${{matrix.libjwt-version}}_nginx-${{matrix.nginx-version}}.tgz" >> $GITHUB_OUTPUT
41
52
53
+
42
54
# TODO cache the build result so we don't have to do this every time?
43
55
- name : Download jansson
44
56
uses : actions/checkout@v4
@@ -104,11 +116,14 @@ jobs:
104
116
uses : actions/upload-artifact@v4
105
117
with :
106
118
if-no-files-found : error
107
- name : ${{steps.meta.outputs.filename}}
119
+ name : release
120
+ path : ${{steps.meta.outputs.filename}}
108
121
109
122
release :
110
123
name : Create/Update Release
111
- needs : build
124
+ needs :
125
+ - meta
126
+ - build
112
127
runs-on : ubuntu-latest
113
128
permissions :
114
129
contents : write
@@ -119,25 +134,38 @@ jobs:
119
134
run : |
120
135
echo "date_now=$(date --rfc-3339=seconds)" >> "${GITHUB_OUTPUT}"
121
136
122
- - name : Download Build Artifacts
137
+ - name : Download Artifacts
123
138
uses : actions/download-artifact@v4
124
139
with :
125
140
path : artifacts
126
141
127
- - name : Upload Builds to Release
142
+ - name : Flatten Artifacts
143
+ run : |
144
+ set -eu
145
+
146
+ cd artifacts
147
+
148
+ for f in $(find . -type f); do
149
+ echo "Staging: ${f}"
150
+ mv "${f}" .
151
+ done
152
+
153
+ find . -type d -mindepth 1 -exec rm -rf "{}" +
154
+
155
+ - name : Create/Update Release
128
156
uses : ncipollo/release-action@v1
129
157
with :
130
- name : ' Development Build: ${{ github.ref_name }}@${{ github.sha }}'
158
+ tag : ${{needs.meta.outputs.tag}}
159
+ name : " Pre-release: ${{ github.ref_name }}@${{ github.sha }}"
131
160
body : |
132
161
> [!WARNING]
133
162
> This is an automatically generated pre-release version of the module, which includes the latest master branch changes.
134
163
> Please report any bugs you find.
135
164
136
165
- Build Date: `${{ steps.vars.outputs.date_now }}`
137
- - Commit: ${{ github.sha }}
166
+ - Commit: ` ${{ github.sha }}`
138
167
prerelease : true
139
168
allowUpdates : true
140
169
removeArtifacts : true
141
170
artifactErrorsFailBuild : true
142
171
artifacts : artifacts/*
143
- tag : dev-build
0 commit comments