forked from dulsi/BYTEPATH
-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (52 loc) · 2.14 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
name: BYTEPATH CI
on:
push:
tags: '*'
pull_request:
jobs:
build:
runs-on: ubuntu-latest
env:
OUTPUT_FOLDER: ./build
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Build artfacts
run: ./release.sh
- name: Prepare Artifact Names
run: |
echo "ARTIFACT_NAME_LOVE=$(find build -iname '*.love' -printf '%f\n')" >> "$GITHUB_ENV"
echo "ARTIFACT_NAME_WIN32=$(find build -iname '*win32*' -printf '%f\n')" >> "$GITHUB_ENV"
echo "ARTIFACT_NAME_DEFAULT_APPIMAGE=$(find build -iname 'BYTEPATH*.AppImage' -printf '%f\n')" >> "$GITHUB_ENV"
echo "ARTIFACT_NAME_DROP-IN_APPIMAGE=$(find build -iname 'game*.AppImage' -printf '%f\n')" >> "$GITHUB_ENV"
- name: Upload Artifact (love)
if: ${{ !github.event.act }} # skip during local actions testing
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME_LOVE }}
path: build/${{ env.ARTIFACT_NAME_LOVE }}
- name: Upload Artifact (win32)
if: ${{ !github.event.act }} # skip during local actions testing
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME_WIN32 }}
path: build/${{ env.ARTIFACT_NAME_WIN32 }}
- name: Upload Artifact (default appimage)
if: ${{ !github.event.act }} # skip during local actions testing
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME_DEFAULT_APPIMAGE }}
path: build/${{ env.ARTIFACT_NAME_DEFAULT_APPIMAGE }}
- name: Upload Artifact (drop-in appimage)
if: ${{ !github.event.act }} # skip during local actions testing
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME_DROP-IN_APPIMAGE }}
path: build/${{ env.ARTIFACT_NAME_DROP-IN_APPIMAGE }}
- name: Upload release
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
uses: ncipollo/release-action@v1
with:
artifacts: build/*
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }}