Skip to content

Commit

Permalink
Update workflows [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDarksideJ authored May 7, 2024
1 parent ac89ee6 commit be0ebd9
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 52 deletions.
80 changes: 40 additions & 40 deletions .github/workflows/development-buildandtestupmrelease.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
name: Build and test UPM packages for platforms, all branches except main

on:
pull_request:
branches-ignore:
- 'main'
# Ignore PRs targeting main

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
# Check Unity version required by the package
validate-environment:
name: Get Unity Version from UPM package
uses: realitycollective/reusableworkflows/.github/workflows/getunityversionfrompackage.yml@v2
with:
build-host: ubuntu-latest

# Check Unity Hub and Editor Environment
Validate-Unity:
name: Validate Unity Install
needs: validate-environment
uses: realitycollective/reusableworkflows/.github/workflows/validateunityinstall.yml@v2
with:
build-target: windows
unityversion: ${{ needs.validate-environment.outputs.unityversion }}

# Run Unity unit tests defined in the package
Run-Unit-Tests:
name: Run Unity Unit Tests
needs: Validate-Unity
uses: realitycollective/reusableworkflows/.github/workflows/rununityUPMbuild.yml@v2
with:
unityversion: ${{ needs.Validate-Unity.outputs.unityeditorversion }}
dependencies: '[{"development": "github.com/realitycollective/com.realitycollective.buildtools.git"},{"ASADependencies": "github.com/realitycollective/com.realitytoolkit.spatial-persistence.asa.git"},{"development": "github.com/realitycollective/com.realitytoolkit.spatial-persistence.git"},{"development": "github.com/realitycollective/com.realitytoolkit.core.git"},{"development": "github.com/realitycollective/com.realitycollective.utilities.git"},{"development": "github.com/realitycollective/com.realitytoolkit.service-framework.git"}]'
name: Build and test UPM packages for platforms, all branches except main

on:
pull_request:
branches-ignore:
- 'main'
# Ignore PRs targeting main

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
# Check Unity version required by the package
validate-environment:
name: Get Unity Version from UPM package
uses: realitycollective/reusableworkflows/.github/workflows/getunityversionfrompackage.yml@v2
with:
build-host: ubuntu-latest

# Check Unity Hub and Editor Environment
Validate-Unity:
name: Validate Unity Install
needs: validate-environment
uses: realitycollective/reusableworkflows/.github/workflows/validateunityinstall.yml@v2
with:
build-target: windows
unityversion: ${{ needs.validate-environment.outputs.unityversion }}

# Run Unity unit tests defined in the package
Run-Unit-Tests:
name: Run Unity Unit Tests
needs: Validate-Unity
uses: realitycollective/reusableworkflows/.github/workflows/rununityUPMbuild.yml@v2
with:
unityversion: ${{ needs.Validate-Unity.outputs.unityeditorversion }}
dependencies: '[{"development": "github.com/realitycollective/com.realitycollective.buildtools.git"},{"ASADependencies": "github.com/realitycollective/com.realitytoolkit.spatial-persistence.asa.git"},{"development": "github.com/realitycollective/com.realitytoolkit.spatial-persistence.git"},{"development": "github.com/realitycollective/com.realitycollective.utilities.git"},{"development": "github.com/realitycollective/com.realitytoolkit.service-framework.git"}]'
secrets: inherit
6 changes: 1 addition & 5 deletions .github/workflows/development-publish.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
name: Publish development branch on Merge

on:
pull_request:
types:
- closed
push:
branches:
- development
# Ignore PRs targeting main

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -17,7 +14,6 @@ concurrency:

jobs:
release_on_merge:
if: github.event.pull_request.merged == true
name: Tag and Publish UPM package
uses: realitycollective/reusableworkflows/.github/workflows/upversionandtagrelease.yml@v2
with:
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/main-publish.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
name: Publish main branch and increment version

on:
pull_request:
types:
- closed
push:
branches:
- main

# Allows you to run this workflow manually from the Actions tab, last resort if GitHub does not behave
workflow_dispatch:

jobs:
# Get Version to tag and release the branch, no up-version - [no-ver] included in PR title
validate-environment:
if: github.event.pull_request.merged == true && contains(github.event.pull_request.title, 'no-ver')
if: contains(github.event.head_commit.message, 'no-ver')
name: Get Version from UPM package
uses: realitycollective/reusableworkflows/.github/workflows/getpackageversionfrompackage.yml@v2
with:
Expand All @@ -28,7 +29,7 @@ jobs:

# Up version the release and publish major release
upversion-major-Package:
if: github.event.pull_request.merged == true && contains(github.event.pull_request.title, 'no-ver') == false && contains(github.event.pull_request.title, 'major-release')
if: contains(github.event.head_commit.message, 'no-ver') == false && contains(github.event.head_commit.message, 'major-release')
name: Major Version package and release
uses: realitycollective/reusableworkflows/.github/workflows/upversionandtagrelease.yml@v2
with:
Expand All @@ -38,7 +39,7 @@ jobs:

# Up version the release and publish minor release
upversion-minor-Package:
if: github.event.pull_request.merged == true && contains(github.event.pull_request.title, 'no-ver') == false && contains(github.event.pull_request.title, 'minor-release')
if: contains(github.event.head_commit.message, 'no-ver') == false && contains(github.event.head_commit.message, 'minor-release')
name: Minor Version package and release
uses: realitycollective/reusableworkflows/.github/workflows/upversionandtagrelease.yml@v2
with:
Expand All @@ -48,7 +49,7 @@ jobs:

# Up version the release and publish patch release (default)
upversion-patch-Package:
if: github.event.pull_request.merged == true && contains(github.event.pull_request.title, 'no-ver') == false && contains(github.event.pull_request.title, 'minor-release') == false && contains(github.event.pull_request.title, 'major-release') == false
if: contains(github.event.head_commit.message, 'no-ver') == false && contains(github.event.head_commit.message, 'minor-release') == false && contains(github.event.head_commit.message, 'major-release') == false
name: Patch Version package and release
uses: realitycollective/reusableworkflows/.github/workflows/upversionandtagrelease.yml@v2
with:
Expand Down

0 comments on commit be0ebd9

Please sign in to comment.