File tree Expand file tree Collapse file tree 2 files changed +74
-0
lines changed
Expand file tree Collapse file tree 2 files changed +74
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ branches :
6+ - " master"
7+ paths :
8+ - ' rockspec/**'
9+
10+ jobs :
11+ release :
12+ name : Release
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v2
17+
18+ - name : Install Lua
19+ uses : leafo/gh-actions-lua@v8
20+
21+ - name : Install Luarocks
22+ uses : leafo/gh-actions-luarocks@v4
23+
24+ - name : Extract release name
25+ id : release_env
26+ shell : bash
27+ run : |
28+ title="${{ github.event.head_commit.message }}"
29+ re="^feat: release v*(\S+)"
30+ if [[ $title =~ $re ]]; then
31+ v=v${BASH_REMATCH[1]}
32+ echo "##[set-output name=version;]${v}"
33+ echo "##[set-output name=version_withou_v;]${BASH_REMATCH[1]}"
34+ else
35+ echo "commit format is not correct"
36+ exit 1
37+ fi
38+
39+ - name : Create Release
40+ uses : actions/create-release@v1
41+ env :
42+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
43+ with :
44+ tag_name : ${{ steps.release_env.outputs.version }}
45+ release_name : ${{ steps.release_env.outputs.version }}
46+ draft : false
47+ prerelease : false
48+
49+ - name : Upload to luarocks
50+ env :
51+ LUAROCKS_TOKEN : ${{ secrets.LUAROCKS_TOKEN }}
52+ run : |
53+ luarocks install dkjson
54+ luarocks upload rockspec/lua-resty-ipmatcher-${{ steps.release_env.outputs.version_withou_v }}-0.rockspec --api-key=${LUAROCKS_TOKEN}
Original file line number Diff line number Diff line change 1+ package = " lua-resty-ipmatcher"
2+ version = " 0.6.1-0"
3+ source = {
4+ url = " git://github.com/api7/lua-resty-ipmatcher" ,
5+ tag = " v0.6.1" ,
6+ }
7+
8+ description = {
9+ summary = " High performance match IP address for Lua(OpenResty)." ,
10+ homepage = " https://github.com/api7/lua-resty-ipmatcher" ,
11+ license = " Apache License 2.0" ,
12+ maintainer = " Yuansheng Wang <membphis@gmail.com>"
13+ }
14+
15+ build = {
16+ type = " builtin" ,
17+ modules = {
18+ [" resty.ipmatcher" ] = " resty/ipmatcher.lua"
19+ }
20+ }
You can’t perform that action at this time.
0 commit comments