-
Notifications
You must be signed in to change notification settings - Fork 2
75 lines (72 loc) · 2.23 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
71
72
73
74
75
name: Build project
env:
itchio_channel: windows
BuildName: Under Runner ${{ github.event.release.tag_name }}
ReleaseBody: ${{github.event.release.body}}
on:
release:
types: [ published ]
jobs:
buildForWindows:
name: Build for Windows
runs-on: windows-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: false
- uses: actions/cache@v3
with:
path: Library
key: Library-StandaloneWindows
restore-keys: Library-
- uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: StandaloneWindows
buildName: ${{ env.BuildName }}
- uses: actions/upload-artifact@v4
with:
name: ${{ env.BuildName }}
path: build/StandaloneWindows
deploy:
needs: buildForWindows
name: Deploy to Itch.io
runs-on: windows-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: false
- name: Download Build Artifact
uses: actions/download-artifact@v4
with:
name: ${{ env.BuildName }}
path: build/StandaloneWindows
- name: Upload Build to itch.io project
uses: robpc/itchio-upload-action@v1
with:
path: build/StandaloneWindows
project: ${{ secrets.ITCHIO_PROJECT }}
channel: ${{ env.itchio_channel }}
version: ${{ github.event.release.tag_name }}
api-key: ${{ secrets.ITCHIO_API_KEY }}
discordMessage:
needs: deploy
name: Discord Notification
runs-on: windows-latest
steps:
- name: Check out repository
uses: actions/checkout@master
- name: send custom message with args
uses: appleboy/discord-action@master
with:
webhook_id: ${{ secrets.WEBHOOK_ID }}
webhook_token: ${{ secrets.WEBHOOK_TOKEN }}
message: "@here ${{ env.BuildName }} is out on https://undermakersinteractive.itch.io/underrunner \n ${{ env.ReleaseBody }} "