Skip to content

Bumped package version to 1.6.0 #15

Bumped package version to 1.6.0

Bumped package version to 1.6.0 #15

name: Build Unity Package
# Controls when the action will run. Triggers the workflow on pushing changes to develop that include
# updating the 'VersionConstants.cs' since this asset will change only on a new version
on:
push:
branches: [ develop ]
paths:
- 'Unity/Assets/JCMG/PackageTools/Scripts/Editor/VersionConstants.cs'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
runs-on: ubuntu-latest
steps:
# Check out the 'develop' and 'release/stable' branch
- uses: actions/checkout@v4
with:
ref: 'develop'
path: './unity-package-tools'
- uses: actions/checkout@v4
with:
ref: 'release/stable'
path: './unity-package-tools_release'
# Retrieve cache for Unity project
- name: Retrieve Unity Library Cache
uses: actions/cache@v3
with:
path: Library
key: Library-${{ hashFiles('./unity-package-tools/Unity/Assets/**', './unity-package-tools/Unity/Packages/**', './unity-package-tools/Unity/ProjectSettings/**') }}
restore-keys: |
Library-
# Execute Unity Unit Tests and Upload results
- name: Run Unity Unit Tests
uses: game-ci/unity-test-runner@v4
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
with:
projectPath: './unity-package-tools/Unity'
unityVersion: 6000.0.28f1
- name: Upload Unit Test Results
uses: actions/upload-artifact@v4
with:
name: Test results
path: artifacts
# Build Unity Package on Develop branch
- name: Execute Unity Package Build
uses: game-ci/unity-builder@v4
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
with:
projectPath: './unity-package-tools/Unity'
unityVersion: 6000.0.28f1
buildMethod: 'JCMG.PackageTools.Editor.PackageToolsCI.Generate'
allowDirtyBuild: true
# Check in Unity Package on Release branch
- name: Add & Commit Release Changes
uses: EndBug/add-and-commit@v9
env:
# This is necessary in order to push a commit to the repo
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged
with:
author_name: Github Action Bot
cwd: './unity-package-tools_release'
branch: 'release/stable'
message: 'Auto-updated package contents'