-
Notifications
You must be signed in to change notification settings - Fork 8
83 lines (70 loc) · 2.23 KB
/
Copy pathbuild.yml
File metadata and controls
83 lines (70 loc) · 2.23 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
name: Build
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
container: ghcr.io/ps2homebrew/ps2homebrew:main
steps:
- name: Install cmake
run: |
apk add cmake
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Fetch full clone
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git fetch --prune --unshallow
- name: Compile project
id: make
env:
KELFSERVER_API_ADDRESS: ${{ secrets.KELFSERVER_API_ADDRESS }}
KELFSERVER_API_KEY: ${{ secrets.KELFSERVER_API_KEY }}
run: |
cmake -B build -DRELEASE=ON
cmake --build build
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: steps.make.outcome == 'success'
with:
name: artifacts
path: |
build/release/**
release:
needs: [build]
runs-on: ubuntu-latest
permissions: write-all
if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Fetch full clone
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git fetch --prune --unshallow
- name: Get git describe
run: |
echo "GIT_VERSION=$(git describe --always --dirty --tags --exclude nightly)" >> $GITHUB_ENV
- name: Download all artifacts
uses: actions/download-artifact@v4
- name: Prepare release archive
run: |
cd artifacts
zip -r ../osdmenu-${{ env.GIT_VERSION }}.zip ./*
- uses: "marvinpinto/action-automatic-releases@latest"
if: github.ref == 'refs/heads/main'
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "nightly"
prerelease: true
title: "Nightly build"
files: |
osdmenu-${{ env.GIT_VERSION }}.zip
- uses: "marvinpinto/action-automatic-releases@latest"
if: startsWith(github.ref, 'refs/tags/v')
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
draft: true
files: |
osdmenu-${{ env.GIT_VERSION }}.zip