-
Notifications
You must be signed in to change notification settings - Fork 19
105 lines (85 loc) · 2.79 KB
/
compilation.yml
File metadata and controls
105 lines (85 loc) · 2.79 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: CI
on:
push:
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Compile native versions
run: |
make --debug
- name: Get short SHA
id: slug
run: |
echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT
- name: Create tar archive (keep executable bit)
run: tar -zcvf ps2client-${{ steps.slug.outputs.sha8 }}-${{matrix.os}}.tar.gz bin
- uses: actions/upload-artifact@v4
with:
name: ps2client-${{ steps.slug.outputs.sha8 }}-${{matrix.os}}
path: |
*tar.gz
build-win:
runs-on: ubuntu-latest
container: dockcross/windows-static-x86:latest
steps:
- uses: actions/checkout@v4
- name: Compile windows version with cross-compilator
run: |
make -f Makefile.mingw32 --trace
- name: Get short SHA
id: slug
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
- name: Create tar archive
run: tar -zcvf ps2client-${{ steps.slug.outputs.sha8 }}-windows-latest.tar.gz bin
- uses: actions/upload-artifact@v4
with:
name: ps2client-${{ steps.slug.outputs.sha8 }}-windows-latest
path: |
*tar.gz
release:
needs: [build, build-win]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
- name: Get short SHA
id: slug
run: |
echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT
- name: Download Mac artifact
uses: actions/download-artifact@v4
with:
name: ps2client-${{ steps.slug.outputs.sha8 }}-macos-latest
- name: Download Ubuntu artifact
uses: actions/download-artifact@v4
with:
name: ps2client-${{ steps.slug.outputs.sha8 }}-ubuntu-latest
- name: Download Windows artifact
uses: actions/download-artifact@v4
with:
name: ps2client-${{ steps.slug.outputs.sha8 }}-windows-latest
- 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: |
*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
files: |
*tar.gz