Skip to content

Commit 53df980

Browse files
authored
Merge pull request #7 from fjtrujy/master
Add compilation scripts to PS2Client repo
2 parents 7f24354 + 8376a72 commit 53df980

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

.github/workflows/compilation.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
repository_dispatch:
7+
types: [run_build]
8+
9+
jobs:
10+
build:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [macos-latest, ubuntu-latest]
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- name: Runs all the stages in the shell
20+
run: |
21+
export PS2DEV=$PWD/ps2dev
22+
export PS2SDK=$PS2DEV/ps2sdk
23+
export GSKIT=$PS2DEV/gsKit
24+
export PATH=$PATH:$PS2DEV/bin:$PS2DEV/ee/bin:$PS2DEV/iop/bin:$PS2DEV/dvp/bin:$PS2SDK/bin
25+
make clean all install
26+
27+
- name: Get short SHA
28+
id: slug
29+
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
30+
31+
- name: Compress bin folder
32+
run: |
33+
tar -zcvf bin.tar.gz ps2dev/bin
34+
35+
- uses: actions/upload-artifact@v2
36+
with:
37+
name: ps2client-${{ steps.slug.outputs.sha8 }}-${{matrix.os}}
38+
path: ps2dev/bin/
39+
40+
- name: Extract tag name
41+
if: startsWith(github.ref, 'refs/tags/')
42+
id: tag
43+
uses: actions/[email protected]
44+
with:
45+
github-token: ${{ secrets.GITHUB_TOKEN }}
46+
script: |
47+
return context.payload.ref.replace(/\/refs\/tags\//, '');
48+
49+
- name: Release
50+
if: startsWith(github.ref, 'refs/tags/')
51+
uses: softprops/action-gh-release@v1
52+
with:
53+
files: ps2dev.tar.gz
54+
tag_name: ${{ steps.tag.outputs.result }}
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# PS2Client
2+
3+
![CI](https://github.com/ps2dev/ps2client/workflows/CI/badge.svg)

0 commit comments

Comments
 (0)