Merge pull request #17 from hexedtech/feat/lua-rock

This commit is contained in:
cschen 2024-09-22 16:19:56 +02:00 committed by GitHub
commit a5410cf1b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 24 additions and 4 deletions

View file

@ -35,19 +35,39 @@ jobs:
buildcmd: cargo rustc --release --features=luajit -- -C link-arg=-undefined -C link-arg=dynamic_lookup
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # necessary to get last tag
- uses: dtolnay/rust-toolchain@stable
- uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: ${{ matrix.platform.buildcmd }}
- run: mv target/release/${{matrix.platform.pre}}codemp.${{matrix.platform.ext}} dist/lua/codemp-lua-${{matrix.platform.arch}}-${{matrix.platform.target}}.${{matrix.platform.ext}}
- id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
with:
fallback: v0.0.0
- run: mv target/release/${{matrix.platform.pre}}codemp.${{matrix.platform.ext}} dist/lua/codemp-lua-${{steps.previoustag.outputs.tag}}-${{matrix.platform.arch}}-${{matrix.platform.target}}.${{matrix.platform.ext}}
- uses: actions/upload-artifact@v4
with:
name: codemp-lua-${{ matrix.platform.target }}
path: dist/lua/codemp-lua-${{matrix.platform.arch}}-${{matrix.platform.target}}.${{matrix.platform.ext}}
path: dist/lua/codemp-lua-*
# TODO this just copies files on our server, maybe consider other ways to distribute? maybe do it properly with versions?
publish:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: leafo/gh-actions-lua@v9
- uses: leafo/gh-actions-luarocks@v4
- run: luarocks install --local dkjson # needed to run upload?? ooook luarocks...
- run: luarocks upload codemp-*.rockspec --api-key ${{ secrets.LUAROCKS_TOKEN }}
working-directory: dist/lua
upload:
runs-on: ubuntu-latest
needs: [build]
steps:

View file

@ -3,7 +3,7 @@ version = "0.7.0-1"
source = {
url = "git+https://github.com/hexedtech/codemp",
branch = "dev",
tag = "v0.7.0",
}
dependencies = {