Skip to content

Commit f827f54

Browse files
fix workflow
1 parent 81a2b44 commit f827f54

File tree

1 file changed

+26
-20
lines changed

1 file changed

+26
-20
lines changed

.github/workflows/make-releases.yml

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
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:
@@ -27,14 +22,24 @@ 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:
29+
fetch-depth: 0
3330
path: 'ngx-http-auth-jwt-module'
3431

32+
- name: Get Metadata
33+
id: meta
34+
run: |
35+
set -eux
36+
tag=$(git describe --tags --abbrev=0)
37+
38+
echo "filename=ngx_http_auth_jwt_module_libjwt_${{matrix.libjwt-version}}_nginx_${{matrix.nginx-version}}_${tag}.tgz" >> $GITHUB_OUTPUT
39+
3540
# TODO cache the build result so we don't have to do this every time?
3641
- name: Download jansson
37-
uses: actions/checkout@v3
42+
uses: actions/checkout@v4
3843
with:
3944
repository: 'akheron/jansson'
4045
ref: 'v2.14'
@@ -50,7 +55,7 @@ jobs:
5055
5156
# TODO cache the build result so we don't have to do this every time?
5257
- name: Download libjwt
53-
uses: actions/checkout@v3
58+
uses: actions/checkout@v4
5459
with:
5560
repository: 'benmcollins/libjwt'
5661
ref: 'v${{matrix.libjwt-version}}'
@@ -82,44 +87,45 @@ jobs:
8287
BUILD_FLAGS="${BUILD_FLAGS} --with-cc-opt='-DNGX_LINKED_LIST_COOKIES=1'"
8388
fi
8489
85-
./configure --with-compat --add-dynamic-module=../ngx-http-auth-jwt-module ${BUILD_FLAGS}
90+
./configure --with-compat --without-http_rewrite_module --add-dynamic-module=../ngx-http-auth-jwt-module ${BUILD_FLAGS}
8691
8792
- name: Make Modules
8893
working-directory: ./nginx
8994
run: make modules
9095

91-
- name: Create release archive
96+
- name: Create Release Archive
9297
run: |
9398
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
99+
tar czf ${{steps.meta.outputs.filename}} ngx_http_auth_jwt_module.so
95100
96-
- name: Upload build artifact
101+
- name: Upload Build Artifact
97102
uses: actions/upload-artifact@v4
98103
with:
99104
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
105+
name: ${{steps.meta.outputs.filename}}
106+
path: ${{steps.meta.outputs.filename}}
102107

103108
update_releases_page:
104-
name: Upload builds to Releases
109+
name: Upload Release
105110
if: github.event_name != 'pull_request'
106111
needs:
107112
- build
108113
runs-on: ubuntu-latest
109114
permissions:
110115
contents: write
111116
steps:
112-
- name: Set up variables
117+
118+
- name: Set-up Variables
113119
id: vars
114120
run: |
115121
echo "date_now=$(date --rfc-3339=seconds)" >> "${GITHUB_OUTPUT}"
116122
117-
- name: Download build artifacts from previous jobs
123+
- name: Download Build Artifacts from Previous Jobs
118124
uses: actions/download-artifact@v3
119125
with:
120126
path: artifacts
121127

122-
- name: Upload builds to Releases
128+
- name: Upload Builds to Release
123129
uses: ncipollo/release-action@v1
124130
with:
125131
allowUpdates: true
@@ -128,7 +134,7 @@ jobs:
128134
body: |
129135
> [!WARNING]
130136
> 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.
137+
> Please report any bugs you find.
132138
133139
- Build Date: `${{ steps.vars.outputs.date_now }}`
134140
- Commit: ${{ github.sha }}

0 commit comments

Comments
 (0)