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,26 @@ 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 :
33
- path : ' ngx-http-auth-jwt-module'
29
+ fetch-depth : 0
30
+ path : ngx-http-auth-jwt-module
31
+
32
+ - name : Get Metadata
33
+ id : meta
34
+ run : |
35
+ set -eux
36
+ cd ngx-http-auth-jwt-module
37
+
38
+ tag=$(git describe --tags --abbrev=0)
39
+
40
+ echo "filename=ngx-http-auth-jwt-module-${tag}_libjwt-${{matrix.libjwt-version}}_nginx-${{matrix.nginx-version}}.tgz" >> $GITHUB_OUTPUT
34
41
35
42
# TODO cache the build result so we don't have to do this every time?
36
43
- name : Download jansson
37
- uses : actions/checkout@v3
44
+ uses : actions/checkout@v4
38
45
with :
39
46
repository : ' akheron/jansson'
40
47
ref : ' v2.14'
50
57
51
58
# TODO cache the build result so we don't have to do this every time?
52
59
- name : Download libjwt
53
- uses : actions/checkout@v3
60
+ uses : actions/checkout@v4
54
61
with :
55
62
repository : ' benmcollins/libjwt'
56
63
ref : ' v${{matrix.libjwt-version}}'
@@ -82,44 +89,43 @@ jobs:
82
89
BUILD_FLAGS="${BUILD_FLAGS} --with-cc-opt='-DNGX_LINKED_LIST_COOKIES=1'"
83
90
fi
84
91
85
- ./configure --with-compat --add-dynamic-module=../ngx-http-auth-jwt-module ${BUILD_FLAGS}
92
+ ./configure --with-compat --without-http_rewrite_module -- add-dynamic-module=../ngx-http-auth-jwt-module ${BUILD_FLAGS}
86
93
87
94
- name : Make Modules
88
95
working-directory : ./nginx
89
96
run : make modules
90
97
91
- - name : Create release archive
98
+ - name : Create Release Archive
92
99
run : |
93
100
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
101
+ tar czf ${{steps.meta.outputs.filename}} ngx_http_auth_jwt_module.so
95
102
96
- - name : Upload build artifact
103
+ - name : Upload Build Artifact
97
104
uses : actions/upload-artifact@v4
98
105
with :
99
106
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
107
+ name : ${{steps.meta.outputs.filename}}
108
+ path : ${{steps.meta.outputs.filename}}
102
109
103
110
update_releases_page :
104
- name : Upload builds to Releases
105
- if : github.event_name != 'pull_request'
106
- needs :
107
- - build
111
+ name : Upload Release
112
+ needs : 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
118
- uses : actions/download-artifact@v3
123
+ - name : Download Build Artifacts from Previous Jobs
124
+ uses : actions/download-artifact@v4
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