MathParser.lua v1.0.3 #6
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: LuaRocks Release | |
on: | |
release: | |
types: [published] | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Lua | |
uses: leafo/gh-actions-lua@v8 | |
with: | |
luaVersion: "5.4.0" | |
- name: Install LuaRocks | |
run: | | |
wget https://luarocks.github.io/luarocks/releases/luarocks-3.11.0.tar.gz | |
tar zxpf luarocks-3.11.0.tar.gz | |
cd luarocks-3.11.0 | |
./configure; sudo make bootstrap | |
cd .. | |
- name: Delete old rockspec files | |
run: | | |
git rm MathParser-*.rockspec || true | |
- name: Generate rockspec | |
run: | | |
sh build/generate_rockspec.sh ${GITHUB_REF#refs/tags/} | |
- name: Upload to LuaRocks | |
run: | | |
luarocks upload --api-key ${{ secrets.LUAROCKS_API_KEY }} MathParser-${GITHUB_REF#refs/tags/}.rockspec | |
- name: Add rockspec to repository | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add MathParser-${GITHUB_REF#refs/tags/}.rockspec | |
git commit -m "Add rockspec for version ${GITHUB_REF#refs/tags/}" | |
git push |