Skip to content

Commit

Permalink
Merge branch 'dev' for v0.10.3
Browse files Browse the repository at this point in the history
  • Loading branch information
EliteAsian123 committed May 21, 2023
2 parents e341f1b + 2d5aae8 commit 2634e9d
Show file tree
Hide file tree
Showing 291 changed files with 46,496 additions and 19,487 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/activation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Acquire activation file
on:
workflow_dispatch: {}
jobs:
activation:
name: Request manual activation file 🔑
runs-on: ubuntu-latest
steps:
# Request manual activation file
- name: Request manual activation file
id: getManualLicenseFile
uses: game-ci/unity-request-activation-file@v2
with:
unityVersion: "2021.3.21f1"
# Upload artifact (Unity_v20XX.X.XXXX.alf)
- name: Expose as artifact
uses: actions/upload-artifact@v2
with:
name: ${{ steps.getManualLicenseFile.outputs.filePath }}
path: ${{ steps.getManualLicenseFile.outputs.filePath }}
159 changes: 159 additions & 0 deletions .github/workflows/build-release-mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
name: Builds - MacOS (release)

on:
workflow_dispatch:
inputs:
version:
description: "Version (x.xx.x)"
required: true
type: string
createZip:
description: "Create .zip file"
default: true
type: boolean
createTar:
description: "Create .tar.bz2 file"
default: true
type: boolean
createDmg:
description: "Create .dmg file"
default: true
type: boolean

# concurrency:
# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
# cancel-in-progress: true

jobs:
macBuilder:
name: Mac Build for v${{ inputs.version }}
runs-on: macos-latest

steps:
###########################
# Checkout #
###########################
- name: "[Pre-install] Pull project"
uses: actions/checkout@v3
with:
lfs: true

###########################
# Cache #
###########################
- name: "[Pre-install] Restore 'library' cache"
uses: actions/cache@v3
with:
path: Library
key: YARG-Library-macos-StandaloneOSX
restore-keys: |
YARG-Library-macos-
YARG-Library-
###########################
# Install Blender #
###########################


- name: "[Pre-install] Get Blender (3.4.1) from cache"
id: blender
uses: actions/cache@v3
with:
path: ${{ runner.temp }}/BlenderInstall
key: blender-3.4.1
restore-keys: blender-

- if: ${{ steps.blender.outputs.cache-hit != 'true' }}
name: "[Pre-install] Download Blender (3.4.1)"
continue-on-error: true
run: mkdir ${{ runner.temp }}/BlenderInstall && curl -L -o "${{ runner.temp }}/BlenderInstall/blender.dmg" https://download.blender.org/release/Blender3.4/blender-3.4.1-macos-x64.dmg

# - name: "[Pre-install] Install Blender"
# run: brew install --cask blender

- name: "[Pre-install] Install Blender (3.4.1)"
run: >
hdiutil attach ${{ runner.temp }}/BlenderInstall/blender.dmg &&
cp -R /Volumes/Blender/Blender.app /Applications &&
hdiutil unmount /Volumes/Blender
###########################
# Install Libraries #
###########################
- name: "[Pre-install] Install Libraries"
run: pip3 install requests && python3 InstallLibraries/install.py

###########################
# Restore Packages #
###########################
- name: "[Pre-install] Restoring NuGet Packages"
run: dotnet tool install --global NuGetForUnity.Cli && nugetforunity restore

###########################
# Build #
###########################
- name: "[Build] Run Builder"
uses: game-ci/[email protected]
continue-on-error: true
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
buildName: YARG
unityVersion: 2021.3.21f1
targetPlatform: StandaloneOSX
cacheUnityInstallationOnMac: true

###########################
# Compress #
###########################
- if: ${{ inputs.createZip == true }}
name: "[Post-build] Compress to a .zip"
run: ditto -c -k --keepParent build/StandaloneOSX/YARG.app YARG_v${{ inputs.version }}-MacOS-Universal.zip

- if: ${{ inputs.createZip == true }}
name: "[Post-build] Upload .zip to artifacts"
uses: actions/upload-artifact@v3
with:
name: YARG_v${{ inputs.version }}-MacOS-Universal.zip
path: YARG_v${{ inputs.version }}-MacOS-Universal.zip

###########################
# Compress .tar.bz2 #
###########################

- if: ${{ inputs.createTar == true }}
name: "[Post-build] Compress to a .tar.bz2"
run: tar --xattrs -c -j -f YARG_v${{ inputs.version }}-MacOS-Universal.tar.bz2 build/StandaloneOSX/YARG.app

- if: ${{ inputs.createTar == true }}
name: "[Post-build] Upload .tar.bz2 to artifacts"
uses: actions/upload-artifact@v3
with:
name: YARG_v${{ inputs.version }}-MacOS-Universal.tar.bz2
path: YARG_v${{ inputs.version }}-MacOS-Universal.tar.bz2

###########################
# Create .DMG #
###########################
- if: ${{ inputs.createDmg == true }}
name: "[Post-build] Create .dmg"
continue-on-error: true
run: >
echo "- Installing create-dmg" &&
brew install graphicsmagick imagemagick &&
npm install --global create-dmg &&
echo "- Creating DMG" &&
create-dmg build/StandaloneOSX/YARG.app --dmg-title=YARG
- if: ${{ inputs.createDmg == true }}
name: "[Post-build] Rename .dmg"
run: find . -name *.dmg -print -exec mv {} "YARG_v${{ inputs.version }}-MacOS-Universal.dmg" \;

- if: ${{ inputs.createDmg == true }}
name: "[Post-build] Upload .dmg to artifacts"
uses: actions/upload-artifact@v3
with:
name: YARG_v${{ inputs.version }}-MacOS-Universal.dmg
path: YARG_v${{ inputs.version }}-MacOS-Universal.dmg
87 changes: 87 additions & 0 deletions .github/workflows/fix-mac-released.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Fix macOS permissions on latest released build

on:
workflow_dispatch:
inputs:
version:
description: "Version (\"vX.XX.X\" or \"latest\")"
default: "latest"
required: true
type: string
createZip:
description: "Create .zip file"
default: true
type: boolean
createTar:
description: "Create .tar.bz2 file"
default: true
type: boolean
createDmg:
description: "Create .dmg file"
default: true
type: boolean

env:
repository: YARC-Official/YARG
fileName: "*.zip"
extract: true

jobs:
fixMacBuild:
name: Fixing Mac permissions for ${{ inputs.version }}
runs-on: macos-latest

steps:
- if: ${{ inputs.version == 'latest' }}
name: Get Latest Release
uses: robinraju/[email protected]
with:
repository: ${{ env.repository }}
fileName: ${{ env.fileName }}
extract: ${{ env.extract }}
token: ${{ secrets.GITHUB_TOKEN }}
latest: true

- if: ${{ inputs.version != 'latest' }}
name: Get specific release (${{ inputs.version }})
uses: robinraju/[email protected]
with:
repository: ${{ env.repository }}
fileName: ${{ env.fileName }}
extract: ${{ env.extract }}
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ inputs.version }}

- name: Fix permissions
run: find . -name *.app -execdir chmod -R +x {}/Contents/MacOS \;

- name: Fix file attributes
run: find . -name *.app -execdir xattr -cr {} \; -execdir xattr -rd com.apple.quarantine {} \;

- name: Create Packages folder
run: mkdir Packages

- if: ${{ inputs.createZip == true }}
name: "Creating .zip"
run: find . -name *.app -execdir ditto -c -k --keepParent {} Packages/{}.zip \;

- if: ${{ inputs.createTar == true }}
name: "Creating .tar.bz2"
run: find . -name *.app -execdir tar --xattrs -c -j -f Packages/{}.tar.bz2 {} \;

- name: "Creating .dmg"
if: ${{ inputs.createDmg == true }}
continue-on-error: true
run: >
echo "- Installing create-dmg" &&
brew install graphicsmagick imagemagick &&
npm install --global create-dmg &&
echo "- Creating DMG" &&
find . -name *.app -execdir create-dmg --dmg-title=YARG {} Packages \;
- name: "Upload pacakges to artifacts"
uses: actions/upload-artifact@v3
with:
name: Packages
path: Packages
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,5 @@ Assets/YargInput.cs
# Rider #
.idea/
Packages/com.thenathannator.hidrogen/
Packages/com.thenathannator.plasticband/
Packages/com.thenathannator.plasticband/
Assets/Nyx
83 changes: 0 additions & 83 deletions Assets/Animations/KickFlash.anim

This file was deleted.

Loading

0 comments on commit 2634e9d

Please sign in to comment.