Skip to content

run_build

run_build #630

Workflow file for this run

name: CI
on:
push:
branches:
- "*"
tags:
- v*
pull_request:
repository_dispatch:
types: [run_build]
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
container: ghcr.io/ps2dev/ps2-packer:latest
strategy:
matrix:
version: [[default, 0], [highloading, 1]]
steps:
- name: Install dependencies
run: |
apk add build-base git
- uses: actions/checkout@v4
- name: Compile project
run: |
make -j $(getconf _NPROCESSORS_ONLN) clean
make -j $(getconf _NPROCESSORS_ONLN) LOADHIGH=${{ matrix.version[1] }}
- name: Get short SHA
id: slug
run: |
printf '%s\n' "sha8=$(printf '%s\n' ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT
- name: Extract tag name
if: startsWith(github.ref, 'refs/tags/')
run: |
echo "DOCKER_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Compress & Rename bin folder
run: |
mv bin/ ps2link/
mv contrib/icon.sys ps2link/icon.sys
mv contrib/PS2LINK.icn ps2link/PS2LINK.icn
tar -zcvf ps2link-${{ steps.slug.outputs.sha8 }}-${{ matrix.version[0] }}.tar.gz ps2link
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ps2link-${{ steps.slug.outputs.sha8 }}-${{ matrix.version[0] }}
path: ps2link-${{ steps.slug.outputs.sha8 }}-${{ matrix.version[0] }}.tar.gz
- name: Upload uncompressd artifacts
uses: actions/upload-artifact@v4
with:
name: ps2link-uncompressed-${{ steps.slug.outputs.sha8 }}-${{ matrix.version[0] }}
path: ee/ps2link.elf
release:
needs: [build]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master'
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: ps2link
- name: Create pre-release
if: github.ref == 'refs/heads/master'
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true
automatic_release_tag: latest
title: Development build
files: ps2link/**/*.tar.gz
- name: Create Tagged Release Draft
if: startsWith(github.ref, 'refs/tags/v')
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
draft: true
automatic_release_tag: RenameMe
files: ps2link/**/*.tar.gz