minecraft-pi-reborn/.gitea/workflows/build.yml
TheBrokenRail 0b252faa5f
Some checks failed
Build / Build (AMD64, Server) (push) Successful in 10m14s
Build / Build (AMD64, Client) (push) Successful in 10m27s
Build / Build (ARM64, Server) (push) Successful in 10m18s
Build / Build (ARM64, Client) (push) Successful in 10m37s
Build / Build (ARMHF, Server) (push) Successful in 7m12s
Build / Build (ARMHF, Client) (push) Successful in 9m44s
Build / Test (Server) (push) Successful in 11m50s
Build / Release (push) Has been skipped
Build / Test (Client) (push) Has been cancelled
Simplify Some Code
2024-01-23 21:58:18 -05:00

94 lines
2.8 KiB
YAML

name: 'Build'
on:
push:
branches:
- master
tags:
- '*'
- '!flatpak'
jobs:
# Build Project
build:
strategy:
fail-fast: false
matrix:
mode:
- Client
- Server
arch:
- AMD64
- ARM64
- ARMHF
name: Build
runs-on: ubuntu-latest
container: node:lts-bullseye
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true
# Dependencies
- name: Install Dependencies
run: ./scripts/install-dependencies.sh ${{ matrix.arch }}
# Build
- name: Build
run: ./scripts/package.sh ${{ matrix.mode }} ${{ matrix.arch }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.mode }}-${{ matrix.arch }}
path: ./out/*.AppImage*
# Test Project
test:
strategy:
fail-fast: false
matrix:
mode:
- Client
- Server
name: Test
runs-on: ubuntu-latest
container: node:lts-bullseye
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true
# Dependencies
- name: Install Dependencies
run: ./scripts/install-dependencies.sh
- name: Install ARM Toolchain
if: ${{ matrix.mode == 'Client' }}
run: apt-get install --no-install-recommends -y g++-arm-linux-gnueabihf gcc-arm-linux-gnueabihf
# Test
- name: Test
run: ./scripts/test.sh ${{ matrix.mode }}
# Create Release
release:
if: startsWith(github.ref, 'refs/tags/')
needs: build
name: Release
runs-on: ubuntu-latest
container: node:lts-bullseye
steps:
# Dependencies
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '>=1.20.1'
# Download Artifacts
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
path: out
# Create Release
- name: Create Release
uses: https://gitea.com/actions/release-action@main
with:
files: ./out
api_key: ${{ secrets.RELEASE_TOKEN }}
title: v${{ github.ref_name }}
body: "[View Changelog](https://gitea.thebrokenrail.com/minecraft-pi-reborn/minecraft-pi-reborn/src/branch/master/docs/CHANGELOG.md)"