ci dependency fix #11
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
build: | |
name: Build For ${{ matrix.build.target }} | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
build: | |
- { target: Android, method: CodeBlaze.Editor.Build.Builder.BuildAndroidRelease } | |
- { target: StandaloneWindows64, method: CodeBlaze.Editor.Build.Builder.BuildWindowsRelease } | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
lfs: true | |
- uses: actions/cache@v3 | |
with: | |
path: Library | |
key: | |
Library-${{ matrix.build.target }}-${{ hashFiles('.') }} | |
restore-keys: | | |
Library-${{ matrix.build.target }}- | |
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: ${{ matrix.build.target }} | |
buildMethod: ${{ matrix.build.method }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Build-${{ matrix.build.target }} | |
path: | | |
Build | |
!**/*DoNotShip*/** | |
!**/*ButDontShipItWithYourGame*/** | |
package: | |
name: Unity Package | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
lfs: true | |
- uses: actions/cache@v3 | |
with: | |
path: Library | |
key: | |
Library-Package-${{ hashFiles('.') }} | |
restore-keys: | | |
Library-Package- | |
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: StandaloneLinux64 | |
buildMethod: CodeBlaze.Editor.Build.Builder.Package | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Package | |
path: vloxyengine.unitypackage | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
needs: [build, package] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
lfs: true | |
- uses: actions/download-artifact@v3 | |
with: | |
path: artifacts | |
- name: Zip artifacts | |
run: | | |
zip -r android-${{ github.ref_name }}.zip artifacts/Build-Android/ | |
zip -r windows64-${{ github.ref_name }}.zip artifacts/Build-StandaloneWindows64/ | |
- name: Move package | |
run: mv artifacts/Package/vloxyengine.unitypackage vloxyengine-${{ github.ref_name }}.unitypackage | |
- name: UPM | |
run: | | |
git branch -d upm &> /dev/null || echo upm branch not found | |
git subtree split -P "$PKG_ROOT" -b upm | |
git checkout upm | |
if [[ -d "Samples" ]]; then | |
git mv Samples Samples~ | |
rm -f Samples.meta | |
git config --global user.name 'github-bot' | |
git config --global user.email '[email protected]' | |
git commit -am "fix: Samples => Samples~" | |
fi | |
git push -f -u origin upm | |
env: | |
PKG_ROOT: Packages/io.codeblaze.vloxyengine | |
- uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
files: | | |
vloxyengine-${{ github.ref_name }}.unitypackage | |
android-${{ github.ref_name }}.zip | |
windows64-${{ github.ref_name }}.zip |