fix: split function accounting for quotes (#158) #310
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 semantic-release@19.0.5 | |
semantic-release | |
sleep 10 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Lua ${{ matrix.lua-version }} | |
uses: leafo/gh-actions-lua@v8.0.0 | |
with: | |
luaVersion: 5.1 | |
- name: Set up luarocks | |
uses: leafo/gh-actions-luarocks@v4.0.0 | |
- 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 }} |