Skip to content

Commit

Permalink
Merge pull request #23 from AndrewKahr/dev-stable
Browse files Browse the repository at this point in the history
Dev stable
  • Loading branch information
AndrewKahr authored Jan 31, 2021
2 parents 6793d8e + 7980f9e commit 09c3c50
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 24 deletions.
1 change: 1 addition & 0 deletions .github/workflows/activation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ jobs:
with:
name: ${{ steps.getManualLicenseFile.outputs.filePath }}
path: ${{ steps.getManualLicenseFile.outputs.filePath }}

39 changes: 24 additions & 15 deletions .github/workflows/createprerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
name: Create Pre-Release

on:
pull_request_review:
submitted:
branches:
- 'dev-stable'
push:
branches:
- 'dev-stable'

env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
Expand All @@ -15,7 +14,6 @@ jobs:
RunProjectTests:
name: Run Tests for Unity Project
runs-on: ubuntu-latest
if: github.event.review.state == 'approved'
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -43,6 +41,9 @@ jobs:
- name: Git LFS Pull
run: git lfs pull

- name: Remove LFS File List
run: sudo rm .lfs-assets-id

- name: Restore Library Cache
uses: actions/cache@v2
with:
Expand All @@ -59,7 +60,7 @@ jobs:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
testMode: playmode

BuildForTargetPlatforms:
name: Build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }}
needs: RunProjectTests
Expand Down Expand Up @@ -102,6 +103,9 @@ jobs:
- name: Git LFS Pull
run: git lfs pull

- name: Remove LFS File List
run: sudo rm .lfs-assets-id

- name: Restore Library Cache
uses: actions/cache@v2
with:
Expand All @@ -120,29 +124,34 @@ jobs:
versioning: Semantic
customParameters: ''

- name: Zip Build
run: (cd build/${{ matrix.targetPlatform }} && sudo zip -r ../../${{ matrix.targetPlatform }}.zip .)

- name: Upload Build Output
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.targetPlatform }}
path: build
name: build
path: ${{ matrix.targetPlatform }}.zip

CreatePreRelease:
name: Create Pre-Release
needs: BuildForTargetPlatforms
runs-on: ubuntu-latest

# REMOVE THIS WHEN AUTOMATIC RELEASES CHANGES TO USE ENVIRONMENT FILES
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

steps:
- name: Get current date
id: date
run: echo "name=$(date +'%Y-%m-%d')" >> $GITHUB_ENV

- name: Download All Builds
uses: actions/download-artifact@v2

- name: Create Release
- name: Create Pre-Release
uses: marvinpinto/action-automatic-releases@v1.1.0
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true
title: 'Development Build ${{ steps.date.outputs.date }}'
files: '*'
automatic_release_tag: 'latest-prerelease'
title: 'Latest Development Build'
files: |
build/*.zip
28 changes: 19 additions & 9 deletions .github/workflows/createrelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Create Release
on:
push:
tags:
- 'v*'
- 'v*'

env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
Expand Down Expand Up @@ -41,6 +41,9 @@ jobs:
- name: Git LFS Pull
run: git lfs pull

- name: Remove LFS File List
run: sudo rm .lfs-assets-id

- name: Restore Library Cache
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -100,6 +103,9 @@ jobs:
- name: Git LFS Pull
run: git lfs pull

- name: Remove LFS File List
run: sudo rm .lfs-assets-id

- name: Restore Library Cache
uses: actions/cache@v2
with:
Expand All @@ -118,21 +124,24 @@ jobs:
versioning: Semantic
customParameters: ''

- name: Zip Build
run: (cd build/${{ matrix.targetPlatform }} && sudo zip -r ../../${{ matrix.targetPlatform }}.zip .)

- name: Upload Build Output
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.targetPlatform }}
path: build
name: build
path: ${{ matrix.targetPlatform }}.zip

CreateRelease:
name: Create Release
needs: BuildForTargetPlatforms
runs-on: ubuntu-latest

# REMOVE THIS WHEN AUTOMATIC RELEASES CHANGES TO USE ENVIRONMENT FILES
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

steps:
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Download All Builds
uses: actions/download-artifact@v2

Expand All @@ -141,5 +150,6 @@ jobs:
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
title: 'Release ${{ env.RELEASE_VERSION }}'
files: '*'
title: 'Latest Release'
files: |
build/*.zip
6 changes: 6 additions & 0 deletions .github/workflows/testandbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ jobs:
- name: Git LFS Pull
run: git lfs pull

- name: Remove LFS File List
run: sudo rm .lfs-assets-id

- name: Restore Library Cache
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -103,6 +106,9 @@ jobs:
- name: Git LFS Pull
run: git lfs pull

- name: Remove LFS File List
run: sudo rm .lfs-assets-id

- name: Restore Library Cache
uses: actions/cache@v2
with:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/weeklybuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ jobs:
- name: Git LFS Pull
run: git lfs pull

- name: Remove LFS File List
run: sudo rm .lfs-assets-id

- name: Restore Library Cache
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -107,6 +110,9 @@ jobs:
- name: Git LFS Pull
run: git lfs pull

- name: Remove LFS File List
run: sudo rm .lfs-assets-id

- name: Restore Library Cache
uses: actions/cache@v2
with:
Expand Down

0 comments on commit 09c3c50

Please sign in to comment.