-
Notifications
You must be signed in to change notification settings - Fork 2
114 lines (96 loc) · 3.49 KB
/
compilation.yml
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
106
107
108
109
110
111
112
113
114
name: CI-compile
on:
push:
pull_request:
jobs:
build:
name: HDLGameInstaller compilation
runs-on: ubuntu-latest
container: ps2dev/ps2dev:v1.0
# instead of "ps2dev/ps2dev:latest" you can use different tags, for example for old projects you can use "ps2dev/ps2dev:v1.0"
steps:
- name: Install dependencies
run: |
apk add build-base git zip
- uses: actions/checkout@v2
- run: |
git fetch --prune --unshallow
- name: Compile project
run: |
make
# commands for compiling your project
- name: Get short SHA and repository name
id: slug
run: |
echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
echo "::set-output name=REPOSITORY_NAME::$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//")"
- name: Upload artifacts
if: ${{ success() }}
uses: actions/upload-artifact@v4
with:
name: ${{ steps.slug.outputs.REPOSITORY_NAME }}-${{ steps.slug.outputs.sha8 }}
path: |
HDLGameInstaller.elf
README.md
lang/*
build-hdlgmanclient:
name: HDLGManClient compilation
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup msbuild
uses: microsoft/setup-msbuild@v1.0.2
- name: Build
run: |
cd HDLGManClient
msbuild /p:Configuration=Release
- uses: actions/upload-artifact@v4
with:
name: HDLGManClient
path: HDLGManClient/Release/HDLGManClient.exe
release:
needs: [build, build-hdlgmanclient]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v2
- name: Get short SHA and repository name
id: slug
run: |
echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
echo "::set-output name=REPOSITORY_NAME::$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//")"
- name: Download HDLGameInstaller artifact
uses: actions/download-artifact@v4
with:
name: ${{ steps.slug.outputs.REPOSITORY_NAME }}-${{ steps.slug.outputs.sha8 }}
path: HDLGameInstaller
- name: Prepare HDLGameInstaller archive
run: |
7z a ${{ steps.slug.outputs.REPOSITORY_NAME }}-${{ steps.slug.outputs.sha8 }}.7z HDLGameInstaller/*
- name: Download HDLGManClient artifact
uses: actions/download-artifact@v4
with:
name: HDLGManClient
- name: Create pre-release
if: github.ref == 'refs/heads/main'
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
automatic_release_tag: "latest"
title: "Development build"
files: |
${{ steps.slug.outputs.REPOSITORY_NAME }}-${{ steps.slug.outputs.sha8 }}.7z
HDLGManClient.exe
- 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
automatic_release_tag: "stable"
draft: true
files: |
${{ steps.slug.outputs.REPOSITORY_NAME }}-${{ steps.slug.outputs.sha8 }}.7z
HDLGManClient.exe