Skip to content

Improve CI (Github Actions) #433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 27 additions & 15 deletions .github/workflows/launcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: Launcher

on:
push:
paths:
- 'dist_cfg/**'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand All @@ -14,16 +11,16 @@ defaults:

jobs:
build:
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- os: ubuntu-20.04
build_cmd: "build-linux"
- runner: ubuntu-latest
os: "linux"
arch: "--x64"

- os: windows-latest
build_cmd: "build-win"
- runner: windows-latest
os: "win"
arch: "--x64"

steps:
Expand Down Expand Up @@ -59,20 +56,35 @@ jobs:

exit 0

- name: Make package.json
- name: Set package version
id: PACKAGE_VERSION
run: |
cd repo-folder
export PACKAGE_VERSION=1.$(git rev-list --count HEAD).0
echo "Making build for version: $PACKAGE_VERSION"
cd ..
node ./repo-folder/build/make_package_json.js build/package.json repo-folder/dist_cfg/config.json Spring-SpringBoard/SpringBoard-Core $PACKAGE_VERSION
echo "version=1.$(git rev-list --count HEAD).0" >> "$GITHUB_OUTPUT"

- name: Make package.json
run: |
echo "Making build for version: ${{ steps.PACKAGE_VERSION.outputs.version }}"
node ./repo-folder/build/make_package_json.js build/package.json repo-folder/dist_cfg/config.json ${{ github.repository }} ${{ steps.PACKAGE_VERSION.outputs.version }}

cat build/package.json

- name: Build
run: |
cd build
npm install
npm run ${{ matrix.build_cmd }} -- ${{ matrix.arch }} --publish always
npm run build-${{ matrix.os }} -- ${{ matrix.arch }} --publish always
env:
GH_TOKEN: ${{ secrets.github_token }}
GH_TOKEN: ${{ secrets.github_token }}

- name: Clean up unwanted build artifacts
run: |
rm -f build/dist/builder-debug.yml
rm -rf build/dist/linux-unpacked
rm -rf build/dist/win-unpacked

- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: SpringBoard-${{ matrix.os }}-${{ steps.PACKAGE_VERSION.outputs.version }}
path: build/dist/**/*
4 changes: 4 additions & 0 deletions .github/workflows/luacheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ jobs:
with:
submodules: 'true'

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libreadline-dev

- name: Install luacheck
run: |
Expand Down