-
Notifications
You must be signed in to change notification settings - Fork 11
54 lines (45 loc) · 1.6 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
name: CI-compile
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
container: ps2dev/ps2dev:v1.0
# instead of "latest" you can use different tags, for example for old projects you can use "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 CDSUPPORT=1 NOT_PACKED=1
# commands for compiling your project
- name: Get short SHA
id: slug
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
- name: Get repository name
id: repname
run: |
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@v2
with:
name: ${{ steps.repname.outputs.REPOSITORY_NAME }}-${{ steps.slug.outputs.sha8 }}
path: './**/*.elf'
# 'path' will create artifact with all *.elf in working directory
# you can change this
- name: Create release
if: github.ref == 'refs/heads/master'
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
title: "Latest development build"
files: './**/*.elf'
# 'files' will create release with all *.elf in working directory
# you can change this