forked from ledgetech/lua-resty-http
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a0500ff
commit b63a9bb
Showing
3 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- "master" | ||
paths: | ||
- 'rockspec/**' | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Lua | ||
uses: leafo/gh-actions-lua@v8 | ||
|
||
- name: Install Luarocks | ||
uses: leafo/gh-actions-luarocks@v4 | ||
|
||
- name: Extract release name | ||
id: release_env | ||
shell: bash | ||
run: | | ||
title="${{ github.event.head_commit.message }}" | ||
re="^feat: release v*(\S+)" | ||
if [[ $title =~ $re ]]; then | ||
v=v${BASH_REMATCH[1]} | ||
echo "##[set-output name=version;]${v}" | ||
echo "##[set-output name=version_withou_v;]${BASH_REMATCH[1]}" | ||
else | ||
echo "commit format is not correct" | ||
exit 1 | ||
fi | ||
- name: Create Release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.release_env.outputs.version }} | ||
release_name: ${{ steps.release_env.outputs.version }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload to luarocks | ||
env: | ||
LUAROCKS_TOKEN: ${{ secrets.LUAROCKS_TOKEN }} | ||
run: | | ||
luarocks install dkjson | ||
luarocks upload rockspec/api7-lua-resty-http-${{ steps.release_env.outputs.version_withou_v }}-0.rockspec --api-key=${LUAROCKS_TOKEN} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package = "api7-lua-resty-http" | ||
version = "0.2.0-0" | ||
source = { | ||
url = "git://github.com/api7/lua-resty-http", | ||
tag = "v0.2.0" | ||
} | ||
description = { | ||
summary = "Lua HTTP client cosocket driver for OpenResty / ngx_lua.", | ||
homepage = "https://github.com/api7/lua-resty-http", | ||
license = "2-clause BSD", | ||
maintainer = "Yuansheng Wang <membphis@gmail.com>" | ||
} | ||
dependencies = { | ||
"lua >= 5.1" | ||
} | ||
build = { | ||
type = "builtin", | ||
modules = { | ||
["resty.http"] = "lib/resty/http.lua", | ||
["resty.http_headers"] = "lib/resty/http_headers.lua", | ||
["resty.http_connect"] = "lib/resty/http_connect.lua" | ||
} | ||
} |