Skip to content

Commit

Permalink
feat: release v0.2.4 (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
spacewander authored Apr 14, 2022
1 parent ba482e1 commit 21c11b1
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/release.yml
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-jwt-${{ steps.release_env.outputs.version_withou_v }}-0.rockspec --api-key=${LUAROCKS_TOKEN}
31 changes: 31 additions & 0 deletions rockspec/api7-lua-resty-jwt-0.2.4-0.rockspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
rockspec_format = '3.0'
package = 'api7-lua-resty-jwt'
version = '0.2.4-0'
source = {
url = 'git://github.com/api7/lua-resty-jwt',
tag = 'v0.2.4'
}
description = {
summary = 'JWT for ngx_lua and LuaJIT.',
detailed = [[
This library requires an nginx build
with OpenSSL, the ngx_lua module,
the LuaJIT 2.0, the lua-resty-hmac,
and the lua-resty-string,
]],
homepage = 'https://github.com/api7/lua-resty-jwt',
license = 'Apache License Version 2'
}
dependencies = {
'lua >= 5.1',
'lua-resty-openssl >= 0.6.8'
}
build = {
type = 'builtin',
modules = {
['resty.jwt'] = 'lib/resty/jwt.lua',
['resty.evp'] = 'lib/resty/evp.lua',
['resty.jwt-validators'] = 'lib/resty/jwt-validators.lua',
['resty.hmac'] = 'third-party/lua-resty-hmac/lib/resty/hmac.lua'
}
}

0 comments on commit 21c11b1

Please sign in to comment.