44 workflow_dispatch :
55
66jobs :
7+ meta :
8+ runs-on : ubuntu-latest
9+ outputs :
10+ tag : ${{steps.meta.outputs.tag}}
11+ steps :
12+ - name : GetMetadata
13+ id : meta
14+ working-directory : ngx-http-auth-jwt-module
15+ run : |
16+ set -eu
17+ tag=$(git describe --tags --abbrev=0)
18+
19+ echo "tag=${tag}" >> $GITHUB_OUTPUT
20+
721 build :
822 name : " NGINX: ${{ matrix.nginx-version }}; libjwt: ${{ matrix.libjwt-version }}"
23+ needs : meta
924 strategy :
1025 matrix :
1126 # NGINX versions to build/test against
12- nginx-version : ['1.20.2', '1.22.1', '1.24.0', '1.26.2', '1.27.3']
27+ nginx-version : ['1.20.2'] # , '1.22.1', '1.24.0', '1.26.2', '1.27.3']
1328
1429 # The following versions of libjwt are compatible:
1530 # * v1.0 - v1.12.0
1934 # * Debian and Ubuntu's repos have v1.10.2
2035 # * EPEL has v1.12.1
2136 # This compiles against each version prior to a breaking change and the latest release
22- libjwt-version : ['1.12.0', '1.14.0', '1.15.3']
37+ libjwt-version : ['1.12.0'] # , '1.14.0', '1.15.3']
2338 runs-on : ubuntu-latest
2439 steps :
2540
@@ -32,13 +47,10 @@ jobs:
3247 - name : Get Metadata
3348 id : meta
3449 run : |
35- set -eux
36- cd ngx-http-auth-jwt-module
37-
38- tag=$(git describe --tags --abbrev=0)
39-
50+ set -eu
4051 echo "filename=ngx-http-auth-jwt-module-${tag}_libjwt-${{matrix.libjwt-version}}_nginx-${{matrix.nginx-version}}.tgz" >> $GITHUB_OUTPUT
4152
53+
4254 # TODO cache the build result so we don't have to do this every time?
4355 - name : Download jansson
4456 uses : actions/checkout@v4
@@ -104,11 +116,14 @@ jobs:
104116 uses : actions/upload-artifact@v4
105117 with :
106118 if-no-files-found : error
107- name : ${{steps.meta.outputs.filename}}
119+ name : release
120+ path : ${{steps.meta.outputs.filename}}
108121
109122 release :
110123 name : Create/Update Release
111- needs : build
124+ needs :
125+ - meta
126+ - build
112127 runs-on : ubuntu-latest
113128 permissions :
114129 contents : write
@@ -119,25 +134,38 @@ jobs:
119134 run : |
120135 echo "date_now=$(date --rfc-3339=seconds)" >> "${GITHUB_OUTPUT}"
121136
122- - name : Download Build Artifacts
137+ - name : Download Artifacts
123138 uses : actions/download-artifact@v4
124139 with :
125140 path : artifacts
126141
127- - name : Upload Builds to Release
142+ - name : Flatten Artifacts
143+ run : |
144+ set -eu
145+
146+ cd artifacts
147+
148+ for f in $(find . -type f); do
149+ echo "Staging: ${f}"
150+ mv "${f}" .
151+ done
152+
153+ find . -type d -mindepth 1 -exec rm -rf "{}" +
154+
155+ - name : Create/Update Release
128156 uses : ncipollo/release-action@v1
129157 with :
130- name : ' Development Build: ${{ github.ref_name }}@${{ github.sha }}'
158+ tag : ${{needs.meta.outputs.tag}}
159+ name : " Pre-release: ${{ github.ref_name }}@${{ github.sha }}"
131160 body : |
132161 > [!WARNING]
133162 > This is an automatically generated pre-release version of the module, which includes the latest master branch changes.
134163 > Please report any bugs you find.
135164
136165 - Build Date: `${{ steps.vars.outputs.date_now }}`
137- - Commit: ${{ github.sha }}
166+ - Commit: ` ${{ github.sha }}`
138167 prerelease : true
139168 allowUpdates : true
140169 removeArtifacts : true
141170 artifactErrorsFailBuild : true
142171 artifacts : artifacts/*
143- tag : dev-build
0 commit comments