Skip to content

Commit bf64d11

Browse files
committed
MP1-1.31Pre: Add Build Actions
1 parent 81cff29 commit bf64d11

File tree

2 files changed

+114
-0
lines changed

2 files changed

+114
-0
lines changed

.github/workflows/mediaportal.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Mediaportal
2+
3+
on:
4+
push:
5+
# On Push to Master branch
6+
branches:
7+
- master
8+
# Ignore all Tags / Release
9+
tags-ignore:
10+
- '**'
11+
workflow_call:
12+
13+
jobs:
14+
build:
15+
name: Build Mediaportal
16+
17+
runs-on: windows-2019
18+
19+
steps:
20+
- name: Setup Visual Studio 2019
21+
uses: microsoft/[email protected]
22+
with:
23+
vs-version: 16.11
24+
25+
- name: Link to Visual Studio 2019 Community
26+
run: |
27+
mklink /J "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community" "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise"
28+
shell: cmd
29+
30+
- name: Setup Java JDK
31+
uses: actions/setup-java@v3
32+
with:
33+
java-version: 8
34+
architecture: x86
35+
distribution: temurin
36+
37+
- name: Setup NSIS
38+
run: |
39+
choco install --yes nsis --version=3.06.1
40+
41+
- name: Git Checkout
42+
uses: actions/checkout@v3
43+
44+
- name: Git Sumbodule Update
45+
run: |
46+
git submodule update --init --recursive
47+
48+
- name: Build
49+
run: |
50+
BuildFullinstaller.cmd
51+
working-directory: ${{ github.workspace }}\Build
52+
shell: cmd
53+
54+
- name: Upload Artifact / Build result
55+
uses: actions/upload-artifact@v3
56+
if: ${{ always() }}
57+
with:
58+
name: Build result file
59+
path: |
60+
${{ github.workspace }}\Build\BuildFullInstaller.log
61+
retention-days: 3
62+
63+
- name: Upload Artifact / Mediaportal setup
64+
uses: actions/upload-artifact@v3
65+
if: ${{ success() }}
66+
with:
67+
name: Mediaportal setup file
68+
path: |
69+
${{ github.workspace }}\Release\MediaPortalSetup_*.exe
70+
if-no-files-found: error
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Mediaportal / Release
2+
3+
on:
4+
push:
5+
# On Tag / Release by Mask
6+
tags:
7+
- "Release_*"
8+
9+
jobs:
10+
build:
11+
uses: ./.github/workflows/mediaportal.yml
12+
13+
release:
14+
name: Release Mediaportal
15+
needs: build
16+
permissions:
17+
contents: write
18+
19+
runs-on: windows-2019
20+
21+
steps:
22+
- name: Download Artifacts
23+
uses: actions/download-artifact@v3
24+
with:
25+
name: Mediaportal setup file
26+
path: release-files
27+
28+
- name: 7z Artifacts
29+
run: |
30+
FOR %%I IN (*.exe) DO 7z.exe a -tZip "%%~nI.zip" "%%~I"
31+
shell: cmd
32+
working-directory: release-files
33+
34+
- name: Check artifacts
35+
run: |
36+
dir /S
37+
shell: cmd
38+
working-directory: release-files
39+
40+
- name: Release
41+
uses: softprops/action-gh-release@v1
42+
with:
43+
files: |
44+
release-files/MediaPortalSetup_*

0 commit comments

Comments
 (0)