Skip to content

Merge pull request #12 from defold/luacheckrc-on-windows #76

Merge pull request #12 from defold/luacheckrc-on-windows

Merge pull request #12 from defold/luacheckrc-on-windows #76

Workflow file for this run

name: build
permissions:
contents: write
on:
push:
branches:
- master
tags:
- "*"
pull_request:
branches:
- master
env:
PROJECT: lua-language-server
BIN_DIR: bin
jobs:
compile:
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-20.04, target: linux, platform: linux-x64, zip: x86_64-linux }
- { os: macos-11, target: darwin, platform: darwin-x64, zip: x86_64-macos }
- { os: macos-11, target: darwin, platform: darwin-arm64, zip: arm64-macos }
- { os: windows-latest, target: windows, platform: win32-x64, zip: x86_64-win32 }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actboy168/setup-luamake@master
- run: luamake -platform ${{ matrix.platform }}
- name: Create bin archive
id: vars
shell: bash
run: |
# Package version
if [[ $GITHUB_REF = refs/tags/* ]]; then
PKG_VERSION=${GITHUB_REF##*/}
else
PKG_VERSION=${GITHUB_SHA:0:7}
fi
# Package name w/ version
PKG_BASENAME="${{ matrix.zip }}"
# Full name of the tarball asset
PKG_NAME="${PKG_BASENAME}.zip"
7z -y a ${PKG_NAME} ${{ env.BIN_DIR }} main.lua debugger.lua LICENSE locale meta/template/ meta/spell/ script
echo PKG_VERSION=${PKG_VERSION} >> $GITHUB_OUTPUT
echo PKG_BASENAME=${PKG_BASENAME} >> $GITHUB_OUTPUT
echo PKG_NAME=${PKG_NAME} >> $GITHUB_OUTPUT
echo PKG_PATH="${PKG_STAGING}/${PKG_NAME}" >> $GITHUB_OUTPUT
echo PKG_STAGING=${PKG_STAGING} >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v4
with:
name: ${{ steps.vars.outputs.PKG_BASENAME }}
path: |
${{ steps.vars.outputs.PKG_NAME }}
create-extension:
needs: compile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v4
- name: "Create "
shell: bash
run: |
7z -y x arm64-macos/arm64-macos.zip -odefold/lsp-lua-language-server/plugins/bin/arm64-macos
cd defold/lsp-lua-language-server/plugins
7z -y a arm64-macos.zip bin
rm -r bin
cd -
7z -y x x86_64-macos/x86_64-macos.zip -odefold/lsp-lua-language-server/plugins/bin/x86_64-macos
cd defold/lsp-lua-language-server/plugins
7z -y a x86_64-macos.zip bin
rm -r bin
cd -
7z -y x x86_64-win32/x86_64-win32.zip -odefold/lsp-lua-language-server/plugins/bin/x86_64-win32
cd defold/lsp-lua-language-server/plugins
7z -y a x86_64-win32.zip bin
rm -r bin
cd -
7z -y x x86_64-linux/x86_64-linux.zip -odefold/lsp-lua-language-server/plugins/bin/x86_64-linux
cd defold/lsp-lua-language-server/plugins
7z -y a x86_64-linux.zip bin
rm -r bin
cd -
cd defold
7z -y a release.zip *
- uses: actions/upload-artifact@v2
with:
name: release
path: defold/release.zip
- name: Publish release assets
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
generate_release_notes: true
files: defold/release.zip