[infra]: with linux also support windows and macos in pipelines #47
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: cluautils workflow | |
on: | |
push: | |
branches: [ "*" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
unit-tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
# TODO: Add windows support later | |
# Will be added later: waiting added support in: https://github.com/leafo/gh-actions-luarocks/pull/14 | |
# - windows-latest | |
- ubuntu-latest | |
- macos-latest | |
- macos-13 | |
runs-on: ${{matrix.os}} | |
steps: | |
- uses: actions/checkout@master | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- uses: luarocks/gh-actions-lua@v10 | |
with: | |
luaVersion: "5.1.5" | |
buildCache: false | |
- uses: luarocks/gh-actions-luarocks@v5 | |
with: | |
luarocksVersion: "3.0.0" | |
- name: build | |
run: | | |
luarocks make | |
- name: test | |
run: | | |
./run_tests.sh "*" | |
deploy: | |
runs-on: ubuntu-latest | |
needs: unit-tests | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- uses: actions/checkout@master | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- uses: luarocks/gh-actions-lua@v10 | |
with: | |
luaVersion: "5.1.5" | |
buildCache: false | |
- uses: luarocks/gh-actions-luarocks@v5 | |
with: | |
luarocksVersion: "3.0.0" | |
- name: publish-luarocks | |
env: | |
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }} | |
run: | | |
git config --global url."https://".insteadOf git:// | |
luarocks install --local dkjson | |
luarocks upload cluautils-*.rockspec --api-key=$LUAROCKS_API_KEY --force |