add: GitHub workflows for testing and releasing #1
This file contains hidden or 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: Publish | ||
| on: | ||
| push: | ||
| tags: | ||
| - "v*.*.*" | ||
| jobs: | ||
| publish: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Lua | ||
| uses: leafo/gh-actions-lua@v11 | ||
| with: | ||
| luaVersion: "5.4.8" | ||
| - name: Set up LuaRocks | ||
| uses: leafo/gh-actions-luarocks@v5 | ||
| - name: Pack Rock | ||
| run: luarocks pack | ||
| - name: Publish to LuaRocks | ||
| run: luarocks upload --api-key=${{ secrets.LUAROCKS_API_KEY } *.rockspec | ||
| - name: Create GitHub Release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| files: *.src.rock | ||