1- name : CI
1+ name : Make Releases
22
33on :
4- push :
5- branches :
6- - master
7- paths :
8- - src/**
94 workflow_dispatch :
105
116jobs :
@@ -27,14 +22,26 @@ jobs:
2722 libjwt-version : ['1.12.0', '1.14.0', '1.15.3']
2823 runs-on : ubuntu-latest
2924 steps :
25+
3026 - name : Checkout Code
31- uses : actions/checkout@v3
27+ uses : actions/checkout@v4
3228 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
3441
3542 # TODO cache the build result so we don't have to do this every time?
3643 - name : Download jansson
37- uses : actions/checkout@v3
44+ uses : actions/checkout@v4
3845 with :
3946 repository : ' akheron/jansson'
4047 ref : ' v2.14'
5057
5158 # TODO cache the build result so we don't have to do this every time?
5259 - name : Download libjwt
53- uses : actions/checkout@v3
60+ uses : actions/checkout@v4
5461 with :
5562 repository : ' benmcollins/libjwt'
5663 ref : ' v${{matrix.libjwt-version}}'
@@ -82,44 +89,45 @@ jobs:
8289 BUILD_FLAGS="${BUILD_FLAGS} --with-cc-opt='-DNGX_LINKED_LIST_COOKIES=1'"
8390 fi
8491
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}
8693
8794 - name : Make Modules
8895 working-directory : ./nginx
8996 run : make modules
9097
91- - name : Create release archive
98+ - name : Create Release Archive
9299 run : |
93100 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
95102
96- - name : Upload build artifact
103+ - name : Upload Build Artifact
97104 uses : actions/upload-artifact@v4
98105 with :
99106 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}}
102109
103110 update_releases_page :
104- name : Upload builds to Releases
111+ name : Upload Release
105112 if : github.event_name != 'pull_request'
106113 needs :
107114 - build
108115 runs-on : ubuntu-latest
109116 permissions :
110117 contents : write
111118 steps :
112- - name : Set up variables
119+
120+ - name : Set-up Variables
113121 id : vars
114122 run : |
115123 echo "date_now=$(date --rfc-3339=seconds)" >> "${GITHUB_OUTPUT}"
116124
117- - name : Download build artifacts from previous jobs
125+ - name : Download Build Artifacts from Previous Jobs
118126 uses : actions/download-artifact@v3
119127 with :
120128 path : artifacts
121129
122- - name : Upload builds to Releases
130+ - name : Upload Builds to Release
123131 uses : ncipollo/release-action@v1
124132 with :
125133 allowUpdates : true
@@ -128,7 +136,7 @@ jobs:
128136 body : |
129137 > [!WARNING]
130138 > 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 .
139+ > Please report any bugs you find.
132140
133141 - Build Date: `${{ steps.vars.outputs.date_now }}`
134142 - Commit: ${{ github.sha }}
0 commit comments