minecraft-pi-reborn/.gitea/workflows/build.yml

95 lines
3.0 KiB
YAML
Raw Normal View History

2023-06-04 03:48:28 +00:00
name: 'Build'
2023-09-21 00:54:07 +00:00
on:
push:
branches:
- master
tags:
- '*'
2023-11-24 08:07:06 +00:00
- '!flatpak'
2023-06-04 03:48:28 +00:00
jobs:
2023-11-24 23:37:08 +00:00
# Build Project
2023-09-21 00:54:07 +00:00
build:
2023-11-24 23:37:08 +00:00
strategy:
fail-fast: false
matrix:
mode:
- Client
- Server
arch:
- AMD64
- ARM64
- ARMHF
2023-11-24 23:53:16 +00:00
name: Build
2023-09-21 00:54:07 +00:00
runs-on: ubuntu-latest
container: node:16-buster
steps:
- name: Checkout Repository
2023-11-24 23:37:08 +00:00
uses: actions/checkout@v4
2023-09-21 00:54:07 +00:00
with:
submodules: true
2023-11-24 23:37:08 +00:00
# Dependencies
2023-09-21 00:54:07 +00:00
- name: Install CMake
run: |
echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/backports.list
apt-get update
apt-get install --no-install-recommends -y -t buster-backports cmake
- name: Install Dependencies
2023-11-24 23:37:08 +00:00
run: ./scripts/install-dependencies.sh ${{ matrix.arch }}
# Build
2023-09-21 00:54:07 +00:00
- name: Build
2023-11-24 23:37:08 +00:00
run: ./scripts/package.sh ${{ matrix.mode }} ${{ matrix.arch }}
2023-09-21 00:54:07 +00:00
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
2023-11-24 23:37:08 +00:00
name: ${{ matrix.mode }}-${{ matrix.arch }}
2023-09-21 04:25:47 +00:00
path: ./out/*.AppImage*
2023-11-24 23:37:08 +00:00
# Test Project
test:
name: Test
runs-on: ubuntu-latest
container: node:16-buster
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true
# Dependencies
- name: Install CMake
run: |
echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/backports.list
apt-get update
apt-get install --no-install-recommends -y -t buster-backports cmake
- name: Install Dependencies
run: ./scripts/install-dependencies.sh
# Test
- name: Test
run: ./scripts/test.sh
# Create Release
release:
if: startsWith(github.ref, 'refs/tags/')
needs: build
name: Release
runs-on: ubuntu-latest
container: node:16-buster
steps:
# Dependencies
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '>=1.20.1'
# Download Artifacts
2023-11-25 07:39:19 +00:00
- name: Download Artifacts
uses: actions/download-artifact@v3
2023-11-24 23:37:08 +00:00
with:
path: out
# Create Release
2023-09-21 00:54:07 +00:00
- name: Create Release
uses: https://gitea.com/actions/release-action@main
with:
2023-11-25 07:39:19 +00:00
files: ./out
2023-09-21 00:54:07 +00:00
api_key: ${{ secrets.RELEASE_TOKEN }}
2023-09-21 16:55:40 +00:00
title: v${{ github.ref_name }}
body: "[View Changelog](https://gitea.thebrokenrail.com/minecraft-pi-reborn/minecraft-pi-reborn/src/branch/master/docs/CHANGELOG.md)"