File tree 3 files changed +77
-0
lines changed
3 files changed +77
-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/api7-lua-resty-http-${{ steps.release_env.outputs.version_withou_v }}-0.rockspec --api-key=${LUAROCKS_TOKEN}
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ package = " api7-lua-resty-http"
2
+ version = " 0.2.0-0"
3
+ source = {
4
+ url = " git://github.com/api7/lua-resty-http" ,
5
+ tag = " v0.2.0"
6
+ }
7
+ description = {
8
+ summary = " Lua HTTP client cosocket driver for OpenResty / ngx_lua." ,
9
+ homepage = " https://github.com/api7/lua-resty-http" ,
10
+ license = " 2-clause BSD" ,
11
+ maintainer = " Yuansheng Wang <[email protected] >"
12
+ }
13
+ dependencies = {
14
+ " lua >= 5.1"
15
+ }
16
+ build = {
17
+ type = " builtin" ,
18
+ modules = {
19
+ [" resty.http" ] = " lib/resty/http.lua" ,
20
+ [" resty.http_headers" ] = " lib/resty/http_headers.lua" ,
21
+ [" resty.http_connect" ] = " lib/resty/http_connect.lua"
22
+ }
23
+ }
You can’t perform that action at this time.
0 commit comments