1- name : CI
1+ name : Make Releases
22
33on :
44 push :
99 workflow_dispatch :
1010
1111jobs :
12+ metadata :
13+ name : Metadata
14+ runs-on : ubuntu-latest
15+ outputs :
16+ tag : ${{ steps.metadata.outputs.tag }}
17+ steps :
18+
19+ - name : Checkout Code
20+ uses : actions/checkout@v4
21+ with :
22+ fetch-depth : 0
23+
24+ - name : Get Metadata
25+ id : metadata
26+ run : |
27+ tag=$(git describe --tags --abbrev=0)
28+
29+ echo "tag=${tag}" >> $GITHUB_OUTPUT
30+
1231 build :
1332 name : " NGINX: ${{ matrix.nginx-version }}; libjwt: ${{ matrix.libjwt-version }}"
33+ needs : metadata
1434 strategy :
1535 matrix :
1636 # NGINX versions to build/test against
@@ -27,14 +47,15 @@ jobs:
2747 libjwt-version : ['1.12.0', '1.14.0', '1.15.3']
2848 runs-on : ubuntu-latest
2949 steps :
50+
3051 - name : Checkout Code
31- uses : actions/checkout@v3
52+ uses : actions/checkout@v4
3253 with :
3354 path : ' ngx-http-auth-jwt-module'
3455
3556 # TODO cache the build result so we don't have to do this every time?
3657 - name : Download jansson
37- uses : actions/checkout@v3
58+ uses : actions/checkout@v4
3859 with :
3960 repository : ' akheron/jansson'
4061 ref : ' v2.14'
5071
5172 # TODO cache the build result so we don't have to do this every time?
5273 - name : Download libjwt
53- uses : actions/checkout@v3
74+ uses : actions/checkout@v4
5475 with :
5576 repository : ' benmcollins/libjwt'
5677 ref : ' v${{matrix.libjwt-version}}'
@@ -82,44 +103,50 @@ jobs:
82103 BUILD_FLAGS="${BUILD_FLAGS} --with-cc-opt='-DNGX_LINKED_LIST_COOKIES=1'"
83104 fi
84105
85- ./configure --with-compat --add-dynamic-module=../ngx-http-auth-jwt-module ${BUILD_FLAGS}
106+ ./configure --with-compat --without-http_rewrite_module -- add-dynamic-module=../ngx-http-auth-jwt-module ${BUILD_FLAGS}
86107
87108 - name : Make Modules
88109 working-directory : ./nginx
89110 run : make modules
90111
91- - name : Create release archive
112+ - name : Determine Archive Info
113+ id : archive-info
114+ run : |
115+ echo "filename=ngx_http_auth_jwt_module_libjwt_${{matrix.libjwt-version}}_nginx_${{matrix.nginx-version}}_${{needs.metadata.outpus.tag}}.tgz"
116+
117+ - name : Create Release Archive
92118 run : |
93119 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
120+ tar czf ${{steps.archive-info.outputs.archive-info.filename}} ngx_http_auth_jwt_module.so
95121
96- - name : Upload build artifact
122+ - name : Upload Build Artifact
97123 uses : actions/upload-artifact@v4
98124 with :
99125 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
126+ name : ${{steps.archive-info.outputs.archive-info.filename}}
127+ path : ${{steps.archive-info.outputs.archive-info.filename}}
102128
103129 update_releases_page :
104- name : Upload builds to Releases
130+ name : Upload Release
105131 if : github.event_name != 'pull_request'
106132 needs :
107133 - build
108134 runs-on : ubuntu-latest
109135 permissions :
110136 contents : write
111137 steps :
112- - name : Set up variables
138+
139+ - name : Set-up Variables
113140 id : vars
114141 run : |
115142 echo "date_now=$(date --rfc-3339=seconds)" >> "${GITHUB_OUTPUT}"
116143
117- - name : Download build artifacts from previous jobs
144+ - name : Download Build Artifacts from Previous Jobs
118145 uses : actions/download-artifact@v3
119146 with :
120147 path : artifacts
121148
122- - name : Upload builds to Releases
149+ - name : Upload Builds to Release
123150 uses : ncipollo/release-action@v1
124151 with :
125152 allowUpdates : true
@@ -128,7 +155,7 @@ jobs:
128155 body : |
129156 > [!WARNING]
130157 > 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 .
158+ > Please report any bugs you find.
132159
133160 - Build Date: `${{ steps.vars.outputs.date_now }}`
134161 - Commit: ${{ github.sha }}
0 commit comments