File tree Expand file tree Collapse file tree 6 files changed +74
-59
lines changed Expand file tree Collapse file tree 6 files changed +74
-59
lines changed Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ branches : [main]
6+
7+ jobs :
8+ release :
9+ name : Release
10+ runs-on : ubuntu-latest
11+ if : " startsWith(github.event.head_commit.message, 'feat: release v')"
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v2
15+
16+ - name : Install Lua
17+ uses : leafo/gh-actions-lua@v8
18+
19+ - name : Install Luarocks
20+ uses : leafo/gh-actions-luarocks@v4
21+
22+ - name : Extract release name
23+ id : release_env
24+ shell : bash
25+ env :
26+ MESSAGE : ${{ github.event.head_commit.message }}
27+ run : |
28+ title="${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 : Check dot version
40+ shell : bash
41+ run : |
42+ if [ "${{ steps.release_env.outputs.version_withou_v }}" != "$(cat .version)" ]; then
43+ echo "VERSION '${{ steps.release_env.outputs.version_withou_v }}' does not match the dot version file '$(cat .version)'"
44+ exit 1
45+ fi
46+
47+ - name : Create Release
48+ uses : actions/create-release@v1
49+ env :
50+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
51+ with :
52+ tag_name : ${{ steps.release_env.outputs.version_withou_v }}
53+ release_name : ${{ steps.release_env.outputs.version }}
54+ draft : false
55+ prerelease : false
56+
57+ - name : Upload to luarocks
58+ env :
59+ VERSION : ${{ steps.release_env.outputs.version_withou_v }}
60+ APIKEY : ${{ secrets.LUAROCKS_TOKEN }}
61+ run : make upload
Original file line number Diff line number Diff line change 1+ 1.5.3
Original file line number Diff line number Diff line change @@ -34,15 +34,16 @@ $(target_rock):
3434 [ -n " $$ VERSION" ] || { echo VERSION not set ; exit 1; }
3535 -@rm -rf /tmp/random_dir_2cs4f0tghRT
3636 mkdir /tmp/random_dir_2cs4f0tghRT
37- cd /tmp/random_dir_2cs4f0tghRT; git clone https://github.com/kong /lua-resty-aws.git
37+ cd /tmp/random_dir_2cs4f0tghRT; git clone https://github.com/api7 /lua-resty-aws.git
3838 cd /tmp/random_dir_2cs4f0tghRT/lua-resty-aws; if [ ! " ${VERSION} " = " dev" ]; then git checkout ${VERSION} ; fi
3939 cd /tmp/random_dir_2cs4f0tghRT/lua-resty-aws; make dev
4040 cd /tmp/random_dir_2cs4f0tghRT; zip -r lua-resty-aws-${VERSION} -1.src.rock lua-resty-aws
4141 cd /tmp/random_dir_2cs4f0tghRT; cat lua-resty-aws/lua-resty-aws-dev-1.rockspec | sed " s/package_version = \" dev\" /package_version = \" ${VERSION} \" /" > lua-resty-aws-${VERSION} -1.rockspec
4242 cd /tmp/random_dir_2cs4f0tghRT; zip -r lua-resty-aws-${VERSION} -1.src.rock lua-resty-aws-${VERSION} -1.rockspec
43- mv /tmp/random_dir_2cs4f0tghRT/lua-resty-aws-${VERSION} -1.src.rock ./
44- -@rm lua-resty-aws-${VERSION} -1.rockspec
45- mv /tmp/random_dir_2cs4f0tghRT/lua-resty-aws-${VERSION} -1.rockspec ./
43+ mv /tmp/random_dir_2cs4f0tghRT/lua-resty-aws-${VERSION} -1.src.rock ./api7-lua-resty-aws-${VERSION} -1.src.rock
44+ -@rm api7-lua-resty-aws-${VERSION} -1.rockspec
45+ mv /tmp/random_dir_2cs4f0tghRT/lua-resty-aws-${VERSION} -1.rockspec ./api7-lua-resty-aws-${VERSION} -1.rockspec
46+
4647
4748pack : $(target_rock )
4849
Original file line number Diff line number Diff line change 1- local package_name = "lua-resty-aws"
1+ local package_name = "api7- lua-resty-aws"
22local package_version = "dev"
33local rockspec_revision = "1"
4- local github_account_name = "Kong "
5- local github_repo_name = package_name
4+ local github_account_name = "api7 "
5+ local github_repo_name = "lua-resty-aws"
66local git_checkout = package_version == "dev" and "main" or package_version
77
88package = package_name
99version = package_version .. "-" .. rockspec_revision
1010
1111source = {
1212 url = "git://github.com/"..github_account_name.."/"..github_repo_name..".git",
13- branch = git_checkout
13+ tag = git_checkout
1414}
1515
1616description = {
@@ -19,7 +19,7 @@ description = {
1919 AWS SDK generated from the same data as the AWS JavaScript SDK.
2020 ]],
2121 license = "Apache 2.0",
22- homepage = "https://"..github_account_name..". github.io /"..github_repo_name .."/topics/README.md.html"
22+ homepage = "https://github.com /"..github_account_name .."/"..github_repo_name
2323}
2424
2525dependencies = {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ LR_API_KEY=$2
77# LR_API_KEY=INfSIgkuArccxH9zq9M7enqackTiYtgRM6c9l6Y4
88
99
10- ROCK_FILE=lua-resty-aws-$ROCK_VERSION .src.rock
11- ROCKSPEC_FILE=lua-resty-aws-$ROCK_VERSION .rockspec
10+ ROCK_FILE=api7- lua-resty-aws-$ROCK_VERSION .src.rock
11+ ROCKSPEC_FILE=api7- lua-resty-aws-$ROCK_VERSION .rockspec
1212
1313if [ " $ROCK_VERSION " == " -1" ]; then
1414 echo " First argument (version) is missing."
You can’t perform that action at this time.
0 commit comments