@@ -3,16 +3,19 @@ name: Build and release Lua NGINX module
33on :
44 workflow_dispatch :
55 push :
6- tags :
7- - " lua-*"
6+ tags : ["lua-*"]
7+
8+ permissions :
9+ contents : write
810
911jobs :
1012 build-lua :
1113 runs-on : ubuntu-latest
12-
1314 steps :
1415 - name : Checkout source
1516 uses : actions/checkout@v4
17+ with :
18+ fetch-depth : 0
1619
1720 - name : Set up QEMU
1821 uses : docker/setup-qemu-action@v3
@@ -32,14 +35,23 @@ jobs:
3235 .
3336
3437 - name : List artifacts
35- run : ls -lah artifacts && ls -lah artifacts/artifacts
38+ run : |
39+ ls -lah artifacts
40+ file artifacts/* || true
3641
3742 - name : Create checksums
3843 run : |
39- cd artifacts/artifacts
40- sha256sum * > SHA256SUMS
44+ cd artifacts
45+ test -f ndk_http_module.so
46+ test -f ngx_http_lua_module.so
47+ if [ -f libluajit-5.1.so.2 ]; then
48+ sha256sum ndk_http_module.so ngx_http_lua_module.so libluajit-5.1.so.2 > SHA256SUMS
49+ else
50+ sha256sum ndk_http_module.so ngx_http_lua_module.so > SHA256SUMS
51+ fi
52+ cat SHA256SUMS
4153
42- - name : Upload Lua modules to GitHub Release
54+ - name : Upload to GitHub Release
4355 uses : softprops/action-gh-release@v2
4456 if : startsWith(github.ref, 'refs/tags/')
4557 with :
4860 artifacts/ngx_http_lua_module.so
4961 artifacts/libluajit-5.1.so.2
5062 artifacts/SHA256SUMS
63+ fail_on_unmatched_files : true
64+ generate_release_notes : true
5165 env :
52- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
66+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
67+
68+ - name : Upload workflow artifacts (fallback)
69+ uses : actions/upload-artifact@v4
70+ with :
71+ name : lua-nginx-mods-${{ github.ref_name }}
72+ path : artifacts/*
0 commit comments