feat: add support for keymatch5 function #314
Workflow file for this run
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
name: Release | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
semantic-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run semantic-release | |
if: github.repository == 'casbin/lua-casbin' && github.event_name == 'push' | |
run: | | |
export PATH="$(yarn global bin):$PATH" | |
yarn global add [email protected] | |
semantic-release | |
sleep 10 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Lua ${{ matrix.lua-version }} | |
uses: leafo/[email protected] | |
with: | |
luaVersion: 5.1 | |
- name: Set up luarocks | |
uses: leafo/[email protected] | |
- name: Set up CJSON | |
run: | | |
luarocks install lua-cjson | |
- name: Upload | |
if: github.repository == 'casbin/lua-casbin' && github.event_name == 'push' | |
run: | | |
rl=$(curl -fsSLI -o /dev/null -w %{url_effective} https://github.com/casbin/lua-casbin/releases/latest) | |
rv=${rl:51} | |
cp ./.github/luarocks-template.rockspec ./casbin-${rv}-1.rockspec | |
sed -i "2iversion = \"${rv}-1\"" ./casbin-${rv}-1.rockspec | |
sed -i "5i\ \ \ tag = \"v${rv}\"" ./casbin-${rv}-1.rockspec | |
cat casbin-${rv}-1.rockspec | |
luarocks upload casbin-${rv}-1.rockspec --force --skip-pack --api-key=${{ secrets.LUAROCKS_API_KEY }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |