1
- name : CI
1
+ name : Make Releases
2
2
3
3
on :
4
- push :
5
- branches :
6
- - master
7
- paths :
8
- - src/**
9
4
workflow_dispatch :
10
5
11
6
jobs :
7
+ meta :
8
+ name : Metadata
9
+ runs-on : ubuntu-latest
10
+ outputs :
11
+ tag : ${{ steps.meta.outputs.tag }}
12
+ steps :
13
+
14
+ - name : Checkout Code
15
+ uses : actions/checkout@v4
16
+ with :
17
+ fetch-depth : 0
18
+
19
+ - name : Get Metadata
20
+ id : meta
21
+ run : |
22
+ set -eux
23
+ tag=$(git describe --tags --abbrev=0)
24
+
25
+ echo "filename=ngx_http_auth_jwt_module_libjwt_${{matrix.libjwt-version}}_nginx_${{matrix.nginx-version}}_${tag}.tgz" >> $GITHUB_OUTPUT
26
+
12
27
build :
13
28
name : " NGINX: ${{ matrix.nginx-version }}; libjwt: ${{ matrix.libjwt-version }}"
29
+ needs : meta
14
30
strategy :
15
31
matrix :
16
32
# NGINX versions to build/test against
@@ -27,14 +43,15 @@ jobs:
27
43
libjwt-version : ['1.12.0', '1.14.0', '1.15.3']
28
44
runs-on : ubuntu-latest
29
45
steps :
46
+
30
47
- name : Checkout Code
31
- uses : actions/checkout@v3
48
+ uses : actions/checkout@v4
32
49
with :
33
50
path : ' ngx-http-auth-jwt-module'
34
-
51
+
35
52
# TODO cache the build result so we don't have to do this every time?
36
53
- name : Download jansson
37
- uses : actions/checkout@v3
54
+ uses : actions/checkout@v4
38
55
with :
39
56
repository : ' akheron/jansson'
40
57
ref : ' v2.14'
50
67
51
68
# TODO cache the build result so we don't have to do this every time?
52
69
- name : Download libjwt
53
- uses : actions/checkout@v3
70
+ uses : actions/checkout@v4
54
71
with :
55
72
repository : ' benmcollins/libjwt'
56
73
ref : ' v${{matrix.libjwt-version}}'
@@ -82,44 +99,45 @@ jobs:
82
99
BUILD_FLAGS="${BUILD_FLAGS} --with-cc-opt='-DNGX_LINKED_LIST_COOKIES=1'"
83
100
fi
84
101
85
- ./configure --with-compat --add-dynamic-module=../ngx-http-auth-jwt-module ${BUILD_FLAGS}
102
+ ./configure --with-compat --without-http_rewrite_module -- add-dynamic-module=../ngx-http-auth-jwt-module ${BUILD_FLAGS}
86
103
87
104
- name : Make Modules
88
105
working-directory : ./nginx
89
106
run : make modules
90
107
91
- - name : Create release archive
108
+ - name : Create Release Archive
92
109
run : |
93
110
cp ./nginx/objs/ngx_http_auth_jwt_module.so ./
94
- tar czf ngx_http_auth_jwt_module_libjwt_ ${{matrix.libjwt-version}}_nginx_${{matrix.nginx-version}}.tgz ngx_http_auth_jwt_module.so
111
+ tar czf ${{needs.meta.outputs.filename}} ngx_http_auth_jwt_module.so
95
112
96
- - name : Upload build artifact
113
+ - name : Upload Build Artifact
97
114
uses : actions/upload-artifact@v4
98
115
with :
99
116
if-no-files-found : error
100
- name : ngx_http_auth_jwt_module_libjwt_ ${{matrix.libjwt-version}}_nginx_${{matrix.nginx-version}}.tgz
101
- path : ngx_http_auth_jwt_module_libjwt_ ${{matrix.libjwt-version}}_nginx_${{matrix.nginx-version}}.tgz
117
+ name : ${{needs.meta.outputs.filename}}
118
+ path : ${{needs.meta.outputs.filename}}
102
119
103
120
update_releases_page :
104
- name : Upload builds to Releases
121
+ name : Upload Release
105
122
if : github.event_name != 'pull_request'
106
123
needs :
107
124
- build
108
125
runs-on : ubuntu-latest
109
126
permissions :
110
127
contents : write
111
128
steps :
112
- - name : Set up variables
129
+
130
+ - name : Set-up Variables
113
131
id : vars
114
132
run : |
115
133
echo "date_now=$(date --rfc-3339=seconds)" >> "${GITHUB_OUTPUT}"
116
134
117
- - name : Download build artifacts from previous jobs
135
+ - name : Download Build Artifacts from Previous Jobs
118
136
uses : actions/download-artifact@v3
119
137
with :
120
138
path : artifacts
121
139
122
- - name : Upload builds to Releases
140
+ - name : Upload Builds to Release
123
141
uses : ncipollo/release-action@v1
124
142
with :
125
143
allowUpdates : true
@@ -128,7 +146,7 @@ jobs:
128
146
body : |
129
147
> [!WARNING]
130
148
> This is an automatically generated pre-release version of the module, which includes the latest master branch changes.
131
- > Please report any bugs you find to the issue tracker .
149
+ > Please report any bugs you find.
132
150
133
151
- Build Date: `${{ steps.vars.outputs.date_now }}`
134
152
- Commit: ${{ github.sha }}
0 commit comments