From a642971a42a6a140de5ab681d575453331650e63 Mon Sep 17 00:00:00 2001 From: zhaozg Date: Sun, 12 Mar 2023 20:59:45 +0800 Subject: [PATCH] ci: fix trigger on tags --- .github/shell/make_rockspec.sh | 6 +++--- .github/workflows/ci.yml | 12 ++++++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/shell/make_rockspec.sh b/.github/shell/make_rockspec.sh index 984a017e..655cdfe8 100755 --- a/.github/shell/make_rockspec.sh +++ b/.github/shell/make_rockspec.sh @@ -9,13 +9,13 @@ fi # .rockspec cp openssl-scm-0.rockspec openssl-${version}.rockspec script="/^version/s@\"[^\"]\\+\"@\"${version}\"@" -sed -e "${script}" -i openssl-${version}.rockspec +sed -e "${script}" -i.bak openssl-${version}.rockspec script="s@https://github.com/zhaozg/lua-openssl/archive/master.zip@https://github.com/zhaozg/lua-openssl/releases/download/$version/openssl-$version.tar.gz@" -sed -e "${script}" -i openssl-${version}.rockspec +sed -e "${script}" -i.bak openssl-${version}.rockspec # .tar.gz rm -rf openssl-${version} mkdir -p openssl-${version}/deps -cp -r LICENSE README.md *.win lib test Makefile samples src deps openssl-${version}/ +cp -r LICENSE README.md *.win test Makefile src deps openssl-${version}/ COPYFILE_DISABLE=true tar -czf openssl-${version}.tar.gz openssl-${version} rm -rf openssl-${version} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36e61b71..de254123 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,8 @@ name: CI on: push: branches: [ "master" ] + tags: + - v?[0-9].[0-9]+.[0-9]+-[0-9]+ pull_request: # The branches below must be a subset of the branches above branches: [ "master" ] @@ -77,7 +79,9 @@ jobs: - name: Luarocks Release # lua-cjson is required for luarocks upload run: | - $HOME/.usr/bin/luarocks install lua-cjson - $HOME/.usr/bin/luarocks build - $HOME/.usr/bin/luarocks test - $HOME/.usr/bin/luarocks upload openssl-${{ steps.get_version.outputs.VERSION }}.rockspec --api-key=${{ secrets.LUAROCKS_TOKEN }} + export PATH=$HOME/.usr/bin:$PATH + export LUA_CPATH=$HOME/.usr/lib/lua/5.1/?.so + luarocks install lua-cjson + luarocks build + luarocks test + luarocks upload openssl-${{ steps.get_version.outputs.VERSION }}.rockspec --api-key=${{ secrets.LUAROCKS_TOKEN }}