-
Notifications
You must be signed in to change notification settings - Fork 8
70 lines (62 loc) · 2.39 KB
/
main.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
name: CI
on:
workflow_dispatch:
push:
branches: [ master, github-workflow-test ]
tags:
- 'v*.*.*'
jobs:
create-release:
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Create Release
id: create_release
if: startsWith(github.ref, 'refs/tags/') # Only release when a tag is pushed
uses: actions/create-release@v1
with:
draft: false
prerelease: false
release_name: Automated Release ${{ github.ref }}
tag_name: ${{ github.ref }}
body: This is an automated release for ${{ github.ref }}`.
env:
GITHUB_TOKEN: ${{ github.token }}
build:
runs-on: self-hosted
strategy:
matrix:
version:
- {major: 4, minor: 24}
- {major: 4, minor: 25}
- {major: 4, minor: 26}
- {major: 4, minor: 27}
- {major: 5, minor: 0}
- {major: 5, minor: 1}
- {major: 5, minor: 2}
- {major: 5, minor: 3}
steps:
- uses: actions/[email protected]
- name: Run Setup Script
run: C:\msys64\msys2_shell.cmd -defterm -here -no-start -mingw64 -shell bash setup.sh
- name: Package for Unreal Engine
run: python package.py "$env:UE_${{ matrix.version.major }}_${{ matrix.version.minor }}" "$env:RUNNER_TEMP"
- name: Upload Build-Artifact
if: startsWith(github.ref, 'refs/heads/') # Upload artifacts when commits (not tags) are pushed
uses: actions/[email protected]
with:
name: UnrealLibretro-${{ matrix.version.major }}.${{ matrix.version.minor }}
path: ${{ runner.temp }}/UnrealLibretro-${{ matrix.version.major }}.${{ matrix.version.minor }}
if-no-files-found: error
- name: Upload Release Asset
id: upload-release-asset
if: startsWith(github.ref, 'refs/tags/') # Only release when a tag is pushed
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ runner.temp }}/UnrealLibretro-${{ matrix.version.major }}.${{ matrix.version.minor }}.zip
asset_name: UnrealLibretro-${{ matrix.version.major }}.${{ matrix.version.minor }}.zip
asset_content_type: application/zip