-
Notifications
You must be signed in to change notification settings - Fork 13
98 lines (84 loc) · 2.72 KB
/
build.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
name: Build/Release
on:
push:
branches: [main, dev]
tags:
- '*'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 19
- name: Install dependencies (Ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y gcc-4.9
sudo apt-get upgrade -y libstdc++6
export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH
# Add any other dependencies that you need to install here
- run: yarn
- run: yarn make
- name: Upload macOS .app
uses: actions/upload-artifact@v1
with:
name: ${{ matrix.os }}
path: out/make/
create-release:
needs: [build]
runs-on: "ubuntu-latest"
# if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/')
steps:
- name: Download Windows Artifact
uses: actions/download-artifact@v1
with:
name: "macos-latest"
- name: Download Linux Artifact
uses: actions/download-artifact@v1
with:
name: "ubuntu-latest"
- name: Download MacOS Artifact
uses: actions/download-artifact@v1
with:
name: "windows-latest"
- name: Make Latest Release
uses: "marvinpinto/action-automatic-releases@latest"
# if: ${{ github.event_name == 'push' }}
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
draft: false
prerelease: true
files: |
windows-latest/**/*
ubuntu-latest/**/*
macos-latest/**/*
title: "PiTV Development Build"
- name: Extract Tag
id: tag
if: startsWith(github.ref, 'refs/tags/')
run: echo ::set-output name=TAG::${GITHUB_REF#refs/tags/}
- name: Make Versioned Release
uses: "marvinpinto/action-automatic-releases@latest"
if: startsWith(github.ref, 'refs/tags/')
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ steps.tag.outputs.TAG }}
draft: false
prerelease: false
files: |
windows-latest/**/*
ubuntu-latest/**/*
macos-latest/**/*
title: "PiTV Stable: ${{ steps.tag.outputs.TAG }}"