Skip to content

Commit

Permalink
ci: fix trigger on tags
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaozg committed Mar 13, 2023
1 parent a082bae commit a642971
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/shell/make_rockspec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
Expand Down Expand Up @@ -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 }}

0 comments on commit a642971

Please sign in to comment.