Skip to content

Commit 5c3d1b9

Browse files
fix workflow
1 parent 81a2b44 commit 5c3d1b9

File tree

1 file changed

+31
-25
lines changed

1 file changed

+31
-25
lines changed

.github/workflows/make-releases.yml

Lines changed: 31 additions & 25 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,26 @@ 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:
33-
path: 'ngx-http-auth-jwt-module'
29+
fetch-depth: 0
30+
path: ngx-http-auth-jwt-module
31+
32+
- name: Get Metadata
33+
id: meta
34+
run: |
35+
set -eux
36+
cd ngx-http-auth-jwt-module
37+
38+
tag=$(git describe --tags --abbrev=0)
39+
40+
echo "filename=ngx-http-auth-jwt-module-${tag}_libjwt-${{matrix.libjwt-version}}_nginx-${{matrix.nginx-version}}.tgz" >> $GITHUB_OUTPUT
3441
3542
# TODO cache the build result so we don't have to do this every time?
3643
- name: Download jansson
37-
uses: actions/checkout@v3
44+
uses: actions/checkout@v4
3845
with:
3946
repository: 'akheron/jansson'
4047
ref: 'v2.14'
@@ -50,7 +57,7 @@ jobs:
5057
5158
# TODO cache the build result so we don't have to do this every time?
5259
- name: Download libjwt
53-
uses: actions/checkout@v3
60+
uses: actions/checkout@v4
5461
with:
5562
repository: 'benmcollins/libjwt'
5663
ref: 'v${{matrix.libjwt-version}}'
@@ -82,44 +89,43 @@ jobs:
8289
BUILD_FLAGS="${BUILD_FLAGS} --with-cc-opt='-DNGX_LINKED_LIST_COOKIES=1'"
8390
fi
8491
85-
./configure --with-compat --add-dynamic-module=../ngx-http-auth-jwt-module ${BUILD_FLAGS}
92+
./configure --with-compat --without-http_rewrite_module --add-dynamic-module=../ngx-http-auth-jwt-module ${BUILD_FLAGS}
8693
8794
- name: Make Modules
8895
working-directory: ./nginx
8996
run: make modules
9097

91-
- name: Create release archive
98+
- name: Create Release Archive
9299
run: |
93100
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
101+
tar czf ${{steps.meta.outputs.filename}} ngx_http_auth_jwt_module.so
95102
96-
- name: Upload build artifact
103+
- name: Upload Build Artifact
97104
uses: actions/upload-artifact@v4
98105
with:
99106
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
107+
name: ${{steps.meta.outputs.filename}}
108+
path: ${{steps.meta.outputs.filename}}
102109

103110
update_releases_page:
104-
name: Upload builds to Releases
105-
if: github.event_name != 'pull_request'
106-
needs:
107-
- build
111+
name: Upload Release
112+
needs: 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
118-
uses: actions/download-artifact@v3
123+
- name: Download Build Artifacts from Previous Jobs
124+
uses: actions/download-artifact@v4
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)