diff options
author | Adam <adamdharrison@gmail.com> | 2022-09-12 18:00:30 -0400 |
---|---|---|
committer | Adam <adamdharrison@gmail.com> | 2022-09-12 18:00:30 -0400 |
commit | 951160580529a3498e62381e29725fa320d076bc (patch) | |
tree | 7fb4db5ca4a5a80d9b98e7f1f744ebea31178a5c /.github | |
parent | e2e70a0d3b74eca224970ec2023561b59a1b2efd (diff) | |
download | lite-xl-plugin-manager-951160580529a3498e62381e29725fa320d076bc.tar.gz lite-xl-plugin-manager-951160580529a3498e62381e29725fa320d076bc.zip |
Added in CI, and added in the ability to cross-compile.
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/build.yml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..2bfa14c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,30 @@ +name: CI +on: { push: { branches: [master] } } +env: { VERSION: "0.1.0" } +jobs: + build: + runs-on: ubuntu-latest + defaults: { run: { shell: bash } } + steps: + - name: Checkout Code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Clone Submodules + run: git submodule update --init --depth=1 + - name: Build Linux + run: | + ./build.sh -DLPM_VERSION='"'$VERSION-x86_64-linux-`git rev-parse --short HEAD`'"' && tar -czvf lpm-$VERSION-x86_64-linux.tar.gz lpm + - name: Package Debian/Ubuntu + env: { REV: "1", ARCH: "amd64", DESCRIPTION: "A plugin manager for the lite-xl text editor.", MAINTAINER: "Adam Harrison <adamdharrison@gmail.com>" } + run: | + export NAME=lite-xl_$VERSION-$REV""_$ARCH + mkdir -p $NAME/usr/bin $NAME/DEBIAN && cp lpm $NAME/usr/bin + printf "Package: lpm\nVersion: $VERSION\nArchitecture: $ARCH\nMaintainer: $MAINTAINER\nDescription: $DESCRIPTION\n" > $NAME/DEBIAN/control + dpkg-deb --build --root-owner-group $NAME + - name: Build Windows + run: | + sudo apt-get install mingw-w64 && ./build.sh clean && CC=x86_64-w64-mingw32-gcc AR=x86_64-w64-mingw32-gcc-ar WINDRES=x86_64-w64-mingw32-windres GIT2_CONFIGURE="-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DBUILD_CLAR=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_SYSTEM_NAME=Windows -DDLLTOOL=x86_64-w64-mingw32-dlltool" SSL_CONFIGURE=mingw ./build.sh -DLPM_VERSION='"'$VERSION-x86_64-linux-`git rev-parse --short HEAD`'"' && zip -r lpm-$VERSION-x86_64-win32.zip lpm.exe + - name: Create Release + env: { GITHUB_TOKEN: "${{ github.token }}" } + run: gh release delete -y continuous || true; gh release create -t 'Continuous Release' continuous *.zip *.tar.gz *.deb |