Skip to content

Commit 937e9aa

Browse files
fix workflow
1 parent 81a2b44 commit 937e9aa

File tree

1 file changed

+39
-16
lines changed

1 file changed

+39
-16
lines changed

.github/workflows/make-releases.yml

Lines changed: 39 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: Make Releases
22

33
on:
44
push:
@@ -9,8 +9,29 @@ on:
99
workflow_dispatch:
1010

1111
jobs:
12+
meta:
13+
name: Metadata
14+
runs-on: ubuntu-latest
15+
outputs:
16+
tag: ${{ steps.meta.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: meta
26+
run: |
27+
set -eux
28+
tag=$(git describe --tags --abbrev=0)
29+
30+
echo "filename=ngx_http_auth_jwt_module_libjwt_${{matrix.libjwt-version}}_nginx_${{matrix.nginx-version}}_${tag}.tgz" >> $GITHUB_OUTPUT
31+
1232
build:
1333
name: "NGINX: ${{ matrix.nginx-version }}; libjwt: ${{ matrix.libjwt-version }}"
34+
needs: meta
1435
strategy:
1536
matrix:
1637
# NGINX versions to build/test against
@@ -27,14 +48,15 @@ jobs:
2748
libjwt-version: ['1.12.0', '1.14.0', '1.15.3']
2849
runs-on: ubuntu-latest
2950
steps:
51+
3052
- name: Checkout Code
31-
uses: actions/checkout@v3
53+
uses: actions/checkout@v4
3254
with:
3355
path: 'ngx-http-auth-jwt-module'
34-
56+
3557
# TODO cache the build result so we don't have to do this every time?
3658
- name: Download jansson
37-
uses: actions/checkout@v3
59+
uses: actions/checkout@v4
3860
with:
3961
repository: 'akheron/jansson'
4062
ref: 'v2.14'
@@ -50,7 +72,7 @@ jobs:
5072
5173
# TODO cache the build result so we don't have to do this every time?
5274
- name: Download libjwt
53-
uses: actions/checkout@v3
75+
uses: actions/checkout@v4
5476
with:
5577
repository: 'benmcollins/libjwt'
5678
ref: 'v${{matrix.libjwt-version}}'
@@ -82,44 +104,45 @@ jobs:
82104
BUILD_FLAGS="${BUILD_FLAGS} --with-cc-opt='-DNGX_LINKED_LIST_COOKIES=1'"
83105
fi
84106
85-
./configure --with-compat --add-dynamic-module=../ngx-http-auth-jwt-module ${BUILD_FLAGS}
107+
./configure --with-compat --without-http_rewrite_module --add-dynamic-module=../ngx-http-auth-jwt-module ${BUILD_FLAGS}
86108
87109
- name: Make Modules
88110
working-directory: ./nginx
89111
run: make modules
90112

91-
- name: Create release archive
113+
- name: Create Release Archive
92114
run: |
93115
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
116+
tar czf ${{needs.meta.outputs.filename}} ngx_http_auth_jwt_module.so
95117
96-
- name: Upload build artifact
118+
- name: Upload Build Artifact
97119
uses: actions/upload-artifact@v4
98120
with:
99121
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
122+
name: ${{needs.meta.outputs.filename}}
123+
path: ${{needs.meta.outputs.filename}}
102124

103125
update_releases_page:
104-
name: Upload builds to Releases
126+
name: Upload Release
105127
if: github.event_name != 'pull_request'
106128
needs:
107129
- build
108130
runs-on: ubuntu-latest
109131
permissions:
110132
contents: write
111133
steps:
112-
- name: Set up variables
134+
135+
- name: Set-up Variables
113136
id: vars
114137
run: |
115138
echo "date_now=$(date --rfc-3339=seconds)" >> "${GITHUB_OUTPUT}"
116139
117-
- name: Download build artifacts from previous jobs
140+
- name: Download Build Artifacts from Previous Jobs
118141
uses: actions/download-artifact@v3
119142
with:
120143
path: artifacts
121144

122-
- name: Upload builds to Releases
145+
- name: Upload Builds to Release
123146
uses: ncipollo/release-action@v1
124147
with:
125148
allowUpdates: true
@@ -128,7 +151,7 @@ jobs:
128151
body: |
129152
> [!WARNING]
130153
> 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.
154+
> Please report any bugs you find.
132155
133156
- Build Date: `${{ steps.vars.outputs.date_now }}`
134157
- Commit: ${{ github.sha }}

0 commit comments

Comments
 (0)