-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
25 additions
and
16 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,13 +29,18 @@ jobs: | |
with: | ||
lfs: true | ||
submodules: true | ||
# fetch-depth: 0 # game-ci/unity-builder optionally needs the whole history, for auto versioning | ||
fetch-depth: 0 # Give dorny/paths-filter enough history to check changes, otherwise it will pull by itself. | ||
|
||
- name: Setup Action Variables | ||
id: vars | ||
run: | | ||
echo "::set-output name=version::$(git describe --tags || echo "v0.0")" | ||
- name: Paths Changes Filter | ||
uses: dorny/[email protected] | ||
id: changes | ||
with: | ||
initial-fetch-depth: 2 | ||
initial-fetch-depth: 0 | ||
base: '${{ github.ref }}' | ||
filters: | | ||
path: | ||
|
@@ -49,9 +54,10 @@ jobs: | |
with: | ||
path: ${{ matrix.path }}/Library | ||
key: ${{ matrix.target }}-${{ matrix.path }}-${{ matrix.version }} | ||
restore-keys: | | ||
${{ matrix.target }}-${{ matrix.path }}- | ||
${{ matrix.target }}- | ||
# restore-keys: | | ||
# ${{ matrix.target }}-${{ matrix.path }}- | ||
# ${{ matrix.target }}- | ||
if: (github.event_name == 'release' && github.event.action == 'published') || steps.changes.outputs.path == 'true' || steps.changes.outputs.workflow == 'true' | ||
|
||
- name: Unity Builder | ||
uses: game-ci/[email protected] | ||
|
@@ -62,24 +68,27 @@ jobs: | |
projectPath: ${{ matrix.path }} | ||
unityVersion: ${{ matrix.version }} | ||
targetPlatform: ${{ matrix.target }} | ||
versioning: Custom | ||
version: ${{ steps.vars.outputs.version }} | ||
# allowDirtyBuild: true # fixes CRLF/LF conversion errors, but dirty | ||
if: (github.event_name == 'release' && github.event.action == 'published') || steps.changes.outputs.path == 'true' || steps.changes.outputs.workflow == 'true' | ||
|
||
- name: Zip build directory | ||
run: | | ||
cd build/ | ||
sudo zip -r "${{ matrix.path }}.${{ matrix.target }}.zip" "${{ matrix.target }}" | ||
sudo mv "${{ matrix.path }}.${{ matrix.target }}.zip" ../ | ||
if: (github.event_name == 'release' && github.event.action == 'published') || steps.changes.outputs.path == 'true' || steps.changes.outputs.workflow == 'true' | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ matrix.path }}.${{ matrix.target }} | ||
path: build/${{ matrix.target }} | ||
retention-days: 28 | ||
name: "${{ matrix.path }}.${{ matrix.target }}.zip" | ||
path: "${{ matrix.path }}.${{ matrix.target }}.zip" | ||
retention-days: 14 | ||
if-no-files-found: error | ||
if: (github.event_name == 'release' && github.event.action == 'published') || steps.changes.outputs.path == 'true' || steps.changes.outputs.workflow == 'true' | ||
|
||
- name: Zip for Release | ||
run: | | ||
cd build/ | ||
zip -r "${{ matrix.path }}.${{ matrix.target }}.zip" "${{ matrix.target }}" | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
|
||
- name: Upload Artifact to Release | ||
uses: actions/[email protected] | ||
env: | ||
|
@@ -89,4 +98,4 @@ jobs: | |
asset_name: ${{ matrix.path }}.${{ matrix.target }}.zip | ||
asset_path: ${{ matrix.path }}.${{ matrix.target }}.zip | ||
asset_content_type: application/zip | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
if: github.event_name == 'release' && github.event.action == 'published' |