Skip to content

fix #157: split function accounting for quotes #309

fix #157: split function accounting for quotes

fix #157: split function accounting for quotes #309

Workflow file for this run

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 }}