Skip to content

Commit

Permalink
workflow yml edits and gitingore ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
soulsyrup committed Dec 21, 2023
1 parent dfc1e7c commit de2cb7b
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 5 deletions.
53 changes: 49 additions & 4 deletions .github/workflows/discord_notification.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,58 @@
name: Send discord notification
name: Unity Build and Discord Notification

on: [push]

jobs:
build:
build-and-notify:
runs-on: ubuntu-latest

steps:
- name: Checkout code
- name: Checkout Code
uses: actions/checkout@v2

- name: Send Discord notification to private dark flow dev discord server
- name: Request Unity Activation File
uses: game-ci/unity-request-activation-file@v1
# Additional steps to setup Unity, including license activation

- name: Cache Library Folder
uses: actions/cache@v2
with:
path: Library
key: Library-${{ runner.os }}-${{ hashFiles('**/ProjectSettings/ProjectVersion.txt') }}
restore-keys: |
Library-${{ runner.os }}-
- name: Build Windows Game
uses: game-ci/unity-builder@v2
with:
projectPath: .
unityVersion: '2022.3.13f1'
targetPlatform: StandaloneWindows64
buildName: game
buildsPath: Build/Windows

- name: Build Linux Game
uses: game-ci/unity-builder@v2
with:
projectPath: .
unityVersion: '2020.3.0f1'
targetPlatform: StandaloneLinux64
buildName: game
buildsPath: Build/Linux

- name: Build macOS Game
uses: game-ci/unity-builder@v2
with:
projectPath: .
unityVersion: '2020.3.0f1'
targetPlatform: StandaloneOSX
buildName: game
buildsPath: Build/macOS

# Add a step for running tests if required

- name: Send Discord Notification
if: always() # This ensures the step runs whether the build succeeds or fails
env:
DISCORD_DEV_SERVER_ID: ${{ secrets.DISCORD_DEV_SERVER_ID }}
DISCORD_DEV_SERVER_TOKEN: ${{ secrets.DISCORD_DEV_SERVER_TOKEN }}
Expand All @@ -17,3 +61,4 @@ jobs:
COMMIT_AUTHOR=$(git log -1 --pretty=format:"%an")
COMMIT_DESCRIPTION=$(git log -1 --pretty=format:"%b")
curl -X POST -H "Content-Type: application/json" -d "{ \"content\": \"New commit by $COMMIT_AUTHOR! Check out the latest changes: https://github.com/Metaverse-Crowdsource/DarkFlow/commits/${{ github.sha }}\", \"embeds\": [ { \"title\": \"$COMMIT_MESSAGE\", \"description\": \"$COMMIT_DESCRIPTION\" } ] }" https://discord.com/api/webhooks/$DISCORD_DEV_SERVER_ID/$DISCORD_DEV_SERVER_TOKEN
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,7 @@ sysinfo.txt
*Sirenix/Demos**

# ClonesManager
*_clone_[0-9]*/
*_clone_[0-9]*/

# Ipynb checkpoints
.ipynb_checkpoints

0 comments on commit de2cb7b

Please sign in to comment.