Skip to content

Move debug statement. #103

Move debug statement.

Move debug statement. #103

Workflow file for this run

name: Build distribution
on:
push:
branches: [ master ]
tags: [ '*' ]
env:
SHELL: /bin/bash
jobs:
buildNative:
runs-on: ubuntu-latest
container: archlinux/archlinux:multilib-devel
steps:
# Install packages
- run: pacman --noconfirm -Sy sbt jdk-openjdk git mingw-w64 clang nasm rustup python3
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
default: true
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: i686-pc-windows-gnu
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: i686-unknown-linux-gnu
# Initialize git
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- run: git config --global --add safe.directory /__w/MPPatch/MPPatch
- run: git fetch --prune --unshallow --tags
# Do the actual build
- run: scripts/ci/build-natives_linux.sh
# Upload artifacts
- uses: actions/upload-artifact@v3
with:
name: mppatch_ci_natives-linux.tar.gz
path: target/mppatch_ci_natives-linux.tar.gz
buildInstallerLinux:
runs-on: ubuntu-latest
needs:
- buildNative
steps:
# Install packages
- uses: actions/setup-java@v3
with:
distribution: 'liberica'
java-version: '21'
- run: sudo apt install libfuse2
# Initialize git
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- run: git fetch --prune --unshallow --tags
# Download artifacts
- uses: actions/download-artifact@v3
with:
name: mppatch_ci_natives-linux.tar.gz
path: target/mppatch_ci_natives-linux
- run: mv target/mppatch_ci_natives-linux/* target/
- run: rm -rf target/mppatch_ci_natives-linux
# Do the actual build
- run: scripts/ci/build-installer_linux.sh
# Upload artifacts
- uses: actions/upload-artifact@v3
with:
name: mppatch_ci_installer-linux
path: target/MPPatch-Installer_*
buildInstallerWindows:
runs-on: windows-latest
needs:
- buildNative
steps:
# Install packages
- uses: actions/setup-java@v3
with:
distribution: 'liberica'
java-version: '21'
# Initialize git
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- run: git fetch --prune --unshallow --tags
# Install dependencies
- uses: ilammy/msvc-dev-cmd@v1
- run: choco install nsis
# Download artifacts
- uses: actions/download-artifact@v3
with:
name: mppatch_ci_natives-linux.tar.gz
path: target/mppatch_ci_natives-linux
- run: mv target/mppatch_ci_natives-linux/* target/
- run: rm -Recurse -Force -Verbose target/mppatch_ci_natives-linux
# Do the actual build
- run: powershell -file scripts/ci/build-installer_win32.ps1
# Upload artifacts
- uses: actions/upload-artifact@v3
with:
name: mppatch_ci_installer-win32
path: target/MPPatch-Installer_*
publishArtifacts:
runs-on: ubuntu-latest
needs:
- buildInstallerLinux
- buildInstallerWindows
steps:
# Initialize git
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Fetch git tags.
run: git fetch --prune --unshallow --tags
- name: Get version as Github variable.
run: 'echo "VERSION_STR=ci_build-$GITHUB_RUN_NUMBER" >> $GITHUB_ENV'
# Download artifacts
- uses: actions/download-artifact@v3
with:
name: mppatch_ci_installer-linux
path: mppatch_ci_installer-linux
- uses: actions/download-artifact@v3
with:
name: mppatch_ci_installer-win32
path: mppatch_ci_installer-win32
- name: Build directory structure
run: |
mkdir -pv target/dist
cp -v mppatch_ci_installer-linux/mppatch_ci_installer-linux/* target/dist/
cp -v mppatch_ci_installer-win32/mppatch_ci_installer-win32/* target/dist/
# Upload the build to GitHub
- name: Remove git hooks (hack to make action-create-tag work)
run: 'rm -rfv .git/hooks/*'
- uses: rickstaa/action-create-tag@v1
with:
tag: ${{ env.VERSION_STR }}
message: CI release ${{ env.VERSION_STR }}
- uses: softprops/action-gh-release@v1
with:
name: ${{ env.VERSION_STR }}
tag_name: ${{ env.VERSION_STR }}
body: |
CI Build ${{ env.VERSION_STR }}
This is an development build.
Expect that things may be completely broken or for there to be subtle game-breaking bugs.
Use this build at your own risk.
prerelease: true
files: target/dist/**
fail_on_unmatched_files: true
generate_release_notes: true