forked from israpps/KELFBinder
-
Notifications
You must be signed in to change notification settings - Fork 1
91 lines (78 loc) · 2.61 KB
/
Copy pathcompilation.yml
File metadata and controls
91 lines (78 loc) · 2.61 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
81
82
83
84
85
86
87
88
89
90
91
name: CI
on:
push:
branches:
- '*'
tags:
- v*
workflow_dispatch:
repository_dispatch:
types: [run_build]
jobs:
build:
runs-on: ubuntu-latest
container: ps2dev/ps2dev:latest
steps:
- name: Install dependencies
run: |
apk add build-base git bash p7zip
- name: Workaround permission issue
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Compile project
run: |
make clean all
- name: Compile debug build
run: |
wget https://github.com/israpps/ps2sdk/releases/download/IRX_debug/IRX.zip -O IRX.zip
7z e IRX.zip
make cleansrc all UDPTTY=1 EE_BIN_BASENAME=KELFBinder_debug_udpbd
- name: Get short SHA
id: slug
run: |
echo "SHA8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_ENV
- name: build changelogs and move extra files
run: |
make changelog
cp LICENSE bin/LICENSE.TXT
- name: Get branch
if: github.ref != 'refs/heads/main'
id: brnch
run: |
echo "BRANCH=$(echo -${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
- name: Upload artifacts
if: ${{ success() }}
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-${{ env.SHA8 }}
path: bin
- name: Compress & Rename bin folder
run: |
echo Repository commit hash is: ${{ env.SHA8 }}>>bin/INSTALL/CORE/HASH.TXT
echo if you report an issue to the developer. there is a high chance that he might ask you this code>>bin/INSTALL/CORE/HASH.TXT
mv bin/ ${{ github.event.repository.name }}/
7z a -t7z ${{ github.event.repository.name }}${{ env.BRANCH }}.7z ${{ github.event.repository.name }}/
- name: Create prerelease
if: github.ref == 'refs/heads/main'
uses: mathieucarbou/marvinpinto-action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
automatic_release_tag: "latest"
title: "Latest development build"
files: |
${{ github.event.repository.name }}${{ env.BRANCH }}.7z
- name: Create prerelease
if: startsWith(github.ref, 'refs/tags/v')
uses: mathieucarbou/marvinpinto-action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
automatic_release_tag: "${{ env.BRANCH }}"
title: "${{ env.BRANCH }}"
files: |
${{ github.event.repository.name }}${{ env.BRANCH }}.7z