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 :
@@ -27,14 +22,24 @@ jobs:
27
22
libjwt-version : ['1.12.0', '1.14.0', '1.15.3']
28
23
runs-on : ubuntu-latest
29
24
steps :
25
+
30
26
- name : Checkout Code
31
- uses : actions/checkout@v3
27
+ uses : actions/checkout@v4
32
28
with :
29
+ fetch-depth : 0
33
30
path : ' ngx-http-auth-jwt-module'
34
31
32
+ - name : Get Metadata
33
+ id : meta
34
+ run : |
35
+ set -eux
36
+ tag=$(git describe --tags --abbrev=0)
37
+
38
+ echo "filename=ngx_http_auth_jwt_module_libjwt_${{matrix.libjwt-version}}_nginx_${{matrix.nginx-version}}_${tag}.tgz" >> $GITHUB_OUTPUT
39
+
35
40
# TODO cache the build result so we don't have to do this every time?
36
41
- name : Download jansson
37
- uses : actions/checkout@v3
42
+ uses : actions/checkout@v4
38
43
with :
39
44
repository : ' akheron/jansson'
40
45
ref : ' v2.14'
50
55
51
56
# TODO cache the build result so we don't have to do this every time?
52
57
- name : Download libjwt
53
- uses : actions/checkout@v3
58
+ uses : actions/checkout@v4
54
59
with :
55
60
repository : ' benmcollins/libjwt'
56
61
ref : ' v${{matrix.libjwt-version}}'
@@ -82,44 +87,45 @@ jobs:
82
87
BUILD_FLAGS="${BUILD_FLAGS} --with-cc-opt='-DNGX_LINKED_LIST_COOKIES=1'"
83
88
fi
84
89
85
- ./configure --with-compat --add-dynamic-module=../ngx-http-auth-jwt-module ${BUILD_FLAGS}
90
+ ./configure --with-compat --without-http_rewrite_module -- add-dynamic-module=../ngx-http-auth-jwt-module ${BUILD_FLAGS}
86
91
87
92
- name : Make Modules
88
93
working-directory : ./nginx
89
94
run : make modules
90
95
91
- - name : Create release archive
96
+ - name : Create Release Archive
92
97
run : |
93
98
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
99
+ tar czf ${{steps.meta.outputs.filename}} ngx_http_auth_jwt_module.so
95
100
96
- - name : Upload build artifact
101
+ - name : Upload Build Artifact
97
102
uses : actions/upload-artifact@v4
98
103
with :
99
104
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
105
+ name : ${{steps.meta.outputs.filename}}
106
+ path : ${{steps.meta.outputs.filename}}
102
107
103
108
update_releases_page :
104
- name : Upload builds to Releases
109
+ name : Upload Release
105
110
if : github.event_name != 'pull_request'
106
111
needs :
107
112
- build
108
113
runs-on : ubuntu-latest
109
114
permissions :
110
115
contents : write
111
116
steps :
112
- - name : Set up variables
117
+
118
+ - name : Set-up Variables
113
119
id : vars
114
120
run : |
115
121
echo "date_now=$(date --rfc-3339=seconds)" >> "${GITHUB_OUTPUT}"
116
122
117
- - name : Download build artifacts from previous jobs
123
+ - name : Download Build Artifacts from Previous Jobs
118
124
uses : actions/download-artifact@v3
119
125
with :
120
126
path : artifacts
121
127
122
- - name : Upload builds to Releases
128
+ - name : Upload Builds to Release
123
129
uses : ncipollo/release-action@v1
124
130
with :
125
131
allowUpdates : true
@@ -128,7 +134,7 @@ jobs:
128
134
body : |
129
135
> [!WARNING]
130
136
> 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 .
137
+ > Please report any bugs you find.
132
138
133
139
- Build Date: `${{ steps.vars.outputs.date_now }}`
134
140
- Commit: ${{ github.sha }}
0 commit comments