Skip to content

Commit 0226694

Browse files
fix workflow
1 parent 81a2b44 commit 0226694

File tree

1 file changed

+37
-12
lines changed

1 file changed

+37
-12
lines changed

.github/workflows/make-releases.yml

Lines changed: 37 additions & 12 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,26 @@ on:
99
workflow_dispatch:
1010

1111
jobs:
12+
metadata:
13+
name: Metadata
14+
runs-on: ubuntu-latest
15+
outputs:
16+
tag: ${{ steps.metadata.outputs.tag }}
17+
steps:
18+
19+
- name: Checkout Code
20+
uses: actions/checkout@v3
21+
22+
- name: Get Metadata
23+
id: metadata
24+
run: |
25+
tag=$(git describe --tags --abbrev=0)
26+
27+
echo "tag=${tag}" >> $GITHUB_OUTPUT
28+
1229
build:
1330
name: "NGINX: ${{ matrix.nginx-version }}; libjwt: ${{ matrix.libjwt-version }}"
31+
needs: metadata
1432
strategy:
1533
matrix:
1634
# NGINX versions to build/test against
@@ -27,6 +45,7 @@ jobs:
2745
libjwt-version: ['1.12.0', '1.14.0', '1.15.3']
2846
runs-on: ubuntu-latest
2947
steps:
48+
3049
- name: Checkout Code
3150
uses: actions/checkout@v3
3251
with:
@@ -82,44 +101,50 @@ jobs:
82101
BUILD_FLAGS="${BUILD_FLAGS} --with-cc-opt='-DNGX_LINKED_LIST_COOKIES=1'"
83102
fi
84103
85-
./configure --with-compat --add-dynamic-module=../ngx-http-auth-jwt-module ${BUILD_FLAGS}
104+
./configure --with-compat --without-http_rewrite_module --add-dynamic-module=../ngx-http-auth-jwt-module ${BUILD_FLAGS}
86105
87106
- name: Make Modules
88107
working-directory: ./nginx
89108
run: make modules
90109

91-
- name: Create release archive
110+
- name: Determine Archive Info
111+
id: archive-info
112+
run: |
113+
echo "filename=ngx_http_auth_jwt_module_libjwt_${{matrix.libjwt-version}}_nginx_${{matrix.nginx-version}}_${{needs.metadata.outpus.tag}}.tgz"
114+
115+
- name: Create Release Archive
92116
run: |
93117
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
118+
tar czf ${{steps.archive-info.outputs.archive-info.filename}} ngx_http_auth_jwt_module.so
95119
96-
- name: Upload build artifact
120+
- name: Upload Build Artifact
97121
uses: actions/upload-artifact@v4
98122
with:
99123
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
124+
name: ${{steps.archive-info.outputs.archive-info.filename}}
125+
path: ${{steps.archive-info.outputs.archive-info.filename}}
102126

103127
update_releases_page:
104-
name: Upload builds to Releases
128+
name: Upload Release
105129
if: github.event_name != 'pull_request'
106130
needs:
107131
- build
108132
runs-on: ubuntu-latest
109133
permissions:
110134
contents: write
111135
steps:
112-
- name: Set up variables
136+
137+
- name: Set-up Variables
113138
id: vars
114139
run: |
115140
echo "date_now=$(date --rfc-3339=seconds)" >> "${GITHUB_OUTPUT}"
116141
117-
- name: Download build artifacts from previous jobs
142+
- name: Download Build Artifacts from Previous Jobs
118143
uses: actions/download-artifact@v3
119144
with:
120145
path: artifacts
121146

122-
- name: Upload builds to Releases
147+
- name: Upload Builds to Release
123148
uses: ncipollo/release-action@v1
124149
with:
125150
allowUpdates: true
@@ -128,7 +153,7 @@ jobs:
128153
body: |
129154
> [!WARNING]
130155
> 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.
156+
> Please report any bugs you find.
132157
133158
- Build Date: `${{ steps.vars.outputs.date_now }}`
134159
- Commit: ${{ github.sha }}

0 commit comments

Comments
 (0)