-
Notifications
You must be signed in to change notification settings - Fork 44
80 lines (73 loc) · 3.42 KB
/
deploy-desktop.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
name: Deploy Desktop
on:
push:
branches:
- master
jobs:
Build-Desktop-And-Snapshot:
runs-on: ubuntu-latest
env:
ORG_GRADLE_PROJECT_GITHUB_USERNAME: ${{ github.actor }}
ORG_GRADLE_PROJECT_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ORG_GRADLE_PROJECT_snapshotUsername: ${{ secrets.NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_snapshotPassword: ${{ secrets.NEXUS_PASSWORD }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: |
./gradlew runtimes:talos:publishAllPublicationsToSnapshotRepository
./gradlew runtimes:talos-libgdx:publishAllPublicationsToSnapshotRepository
./gradlew runtimes:talos-bongo:publishAllPublicationsToSnapshotRepository
./gradlew tools:publishAllPublicationsToSnapshotRepository
./gradlew editor-desktop:dist
./gradlew editor-desktop-bootstrap:genConfig
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: 'just-a-placeholder-so-we-dont-get-errors'
- name: Adding Known Hosts
run: ssh-keyscan -H ${{ secrets.SSH_SERVER }} >> ~/.ssh/known_hosts
- name: Make dir in prep for binaries
run: ssh ${{secrets.SSH_SERVER_USER }}@${{secrets.SSH_SERVER }} "mkdir -p /var/www/editor.talosvfx.com/raw-editor-binaries"
- name: Deploy binary jar to server with scp
run: scp -r ./editor-desktop/build/libs/* ${{secrets.SSH_SERVER_USER }}@${{secrets.SSH_SERVER }}:/var/www/editor.talosvfx.com/raw-editor-binaries
- name: Deploy config with scp
run: scp -r ./editor-desktop-bootstrap/dist/* ${{secrets.SSH_SERVER_USER }}@${{secrets.SSH_SERVER }}:/var/www/editor.talosvfx.com/raw-editor-binaries
- name: Execute repo gen
run: ssh ${{secrets.SSH_SERVER_USER }}@${{secrets.SSH_SERVER }} 'bash -s' < ./editor-desktop-bootstrap/remote-repogen.sh
- name: Notify Discord
if: always()
uses: tsickert/[email protected]
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
embed-title: New TalosVFX build available!
embed-description: |
Developer: [`${{ github.actor }}`](https://github.com/${{ github.actor }})
GH Actions Run: [`${{ github.run_id }}`](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})
Commit SHA: [`${{ github.sha }}`](https://github.com/${{github.repository}}/commit/${{github.sha}})
Branch: [`${{ github.ref_name }}`]
State: [`${{ job.status }}`]
embed-color: 15548997
- name: Slack notify
uses: ravsamhq/notify-slack-action@v2
if: always()
with:
status: ${{ job.status }}
notification_title: "{workflow} has {status_message}"
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>"
footer: "Linked Repo <{repo_url}|{repo}>"
notify_when: "success,failure"
mention_users: "U0160UUNH8S,U0080UUAA9N"
mention_users_when: "failure,warnings"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}