Skip to content

Commit a3a1f54

Browse files
fix workflow
1 parent 81a2b44 commit a3a1f54

File tree

1 file changed

+39
-21
lines changed

1 file changed

+39
-21
lines changed

.github/workflows/make-releases.yml

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

33
on:
4-
push:
5-
branches:
6-
- master
7-
paths:
8-
- src/**
94
workflow_dispatch:
105

116
jobs:
7+
meta:
8+
name: Metadata
9+
runs-on: ubuntu-latest
10+
outputs:
11+
tag: ${{ steps.meta.outputs.tag }}
12+
steps:
13+
14+
- name: Checkout Code
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Get Metadata
20+
id: meta
21+
run: |
22+
set -eux
23+
tag=$(git describe --tags --abbrev=0)
24+
25+
echo "filename=ngx_http_auth_jwt_module_libjwt_${{matrix.libjwt-version}}_nginx_${{matrix.nginx-version}}_${tag}.tgz" >> $GITHUB_OUTPUT
26+
1227
build:
1328
name: "NGINX: ${{ matrix.nginx-version }}; libjwt: ${{ matrix.libjwt-version }}"
29+
needs: meta
1430
strategy:
1531
matrix:
1632
# NGINX versions to build/test against
@@ -27,14 +43,15 @@ jobs:
2743
libjwt-version: ['1.12.0', '1.14.0', '1.15.3']
2844
runs-on: ubuntu-latest
2945
steps:
46+
3047
- name: Checkout Code
31-
uses: actions/checkout@v3
48+
uses: actions/checkout@v4
3249
with:
3350
path: 'ngx-http-auth-jwt-module'
34-
51+
3552
# TODO cache the build result so we don't have to do this every time?
3653
- name: Download jansson
37-
uses: actions/checkout@v3
54+
uses: actions/checkout@v4
3855
with:
3956
repository: 'akheron/jansson'
4057
ref: 'v2.14'
@@ -50,7 +67,7 @@ jobs:
5067
5168
# TODO cache the build result so we don't have to do this every time?
5269
- name: Download libjwt
53-
uses: actions/checkout@v3
70+
uses: actions/checkout@v4
5471
with:
5572
repository: 'benmcollins/libjwt'
5673
ref: 'v${{matrix.libjwt-version}}'
@@ -82,44 +99,45 @@ jobs:
8299
BUILD_FLAGS="${BUILD_FLAGS} --with-cc-opt='-DNGX_LINKED_LIST_COOKIES=1'"
83100
fi
84101
85-
./configure --with-compat --add-dynamic-module=../ngx-http-auth-jwt-module ${BUILD_FLAGS}
102+
./configure --with-compat --without-http_rewrite_module --add-dynamic-module=../ngx-http-auth-jwt-module ${BUILD_FLAGS}
86103
87104
- name: Make Modules
88105
working-directory: ./nginx
89106
run: make modules
90107

91-
- name: Create release archive
108+
- name: Create Release Archive
92109
run: |
93110
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
111+
tar czf ${{needs.meta.outputs.filename}} ngx_http_auth_jwt_module.so
95112
96-
- name: Upload build artifact
113+
- name: Upload Build Artifact
97114
uses: actions/upload-artifact@v4
98115
with:
99116
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
117+
name: ${{needs.meta.outputs.filename}}
118+
path: ${{needs.meta.outputs.filename}}
102119

103120
update_releases_page:
104-
name: Upload builds to Releases
121+
name: Upload Release
105122
if: github.event_name != 'pull_request'
106123
needs:
107124
- build
108125
runs-on: ubuntu-latest
109126
permissions:
110127
contents: write
111128
steps:
112-
- name: Set up variables
129+
130+
- name: Set-up Variables
113131
id: vars
114132
run: |
115133
echo "date_now=$(date --rfc-3339=seconds)" >> "${GITHUB_OUTPUT}"
116134
117-
- name: Download build artifacts from previous jobs
135+
- name: Download Build Artifacts from Previous Jobs
118136
uses: actions/download-artifact@v3
119137
with:
120138
path: artifacts
121139

122-
- name: Upload builds to Releases
140+
- name: Upload Builds to Release
123141
uses: ncipollo/release-action@v1
124142
with:
125143
allowUpdates: true
@@ -128,7 +146,7 @@ jobs:
128146
body: |
129147
> [!WARNING]
130148
> 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.
149+
> Please report any bugs you find.
132150
133151
- Build Date: `${{ steps.vars.outputs.date_now }}`
134152
- Commit: ${{ github.sha }}

0 commit comments

Comments
 (0)