forked from israpps/FreeMcBoot-Installer
-
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (69 loc) · 2.39 KB
/
compile-core.yml
File metadata and controls
80 lines (69 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Build [All]
on:
workflow_dispatch:
push:
paths:
- 'installer/**'
- 'installer_res/**'
- '.github/workflows/compile-core.yml'
schedule:
- cron: "0 15 1 * *"
jobs:
build-packages:
runs-on: ubuntu-latest
container: ps2dev/ps2dev:v1.0
steps:
- name: Install dependencies
run: apk add --no-cache build-base git zip p7zip
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate build metadata
run: |
echo "SHA8=${GITHUB_SHA::8}" >> $GITHUB_ENV
echo "BUILD_TS=$(date +'%Y-%m-%d_%H-%M-%S')" >> $GITHUB_ENV
- name: Compile
run: |
cd installer
make rebuild FMCB_INSTALLER_VERSION=${{ env.SHA8 }} EE_BIN_DIR=../installer_res/
make rebuild FMCB_INSTALLER_VERSION=${{ env.SHA8 }} EE_BIN_DIR=../installer_res/ EXFAT=1
- name: Prepare folder for Release
run: |
cd installer_res
chmod +x ./pack.sh
./pack.sh
mkdir -p ../release_artifacts
mv ../FMCB-1966.7z ../release_artifacts/OSDMenu-Installer-${{ env.BUILD_TS }}.7z
- name: Upload artifact
if: success()
uses: actions/upload-artifact@v4
with:
name: FMCB-${{ env.SHA8 }}
path: release_artifacts/OSDMenu-Installer-${{ env.BUILD_TS }}.7z
- name: Generate changelog since last tag
id: changelog
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
LAST_TAG=$(git describe --tags --abbrev=0 || echo "")
echo "Last tag was: $LAST_TAG"
LOG_BODY=""
if [ -n "$LAST_TAG" ]; then
LOG_BODY="$(git log $LAST_TAG..HEAD --pretty=format:"- %s (%h) by %an")"
else
LOG_BODY="$(git log --pretty=format:"- %s (%h) by %an")"
fi
echo 'RELEASE_BODY<<EOF' >> $GITHUB_ENV
echo "$LOG_BODY" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Create release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "OSDMenu"
prerelease: true
title: "OSDMenu Installer"
files: |
release_artifacts/OSDMenu-Installer-${{ env.BUILD_TS }}.7z
body: |
### Recent Changes:
${{ env.RELEASE_BODY }}