Skip to content

Commit

Permalink
releasearc introduction. and split up workflow files
Browse files Browse the repository at this point in the history
  • Loading branch information
Cammin committed May 6, 2024
1 parent d3f90df commit ad909b8
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 60 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Semantic Release
on:
push:
branches:
- master
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
- name: Release
uses: cycjimmy/[email protected]
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
branch: master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62 changes: 2 additions & 60 deletions .github/workflows/main.yml → .github/workflows/test-runner.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Main Build Actions
name: Test Runner

on: [push, pull_request, workflow_dispatch]

Expand Down Expand Up @@ -58,62 +58,4 @@ jobs:
if: always()
with:
name: Test results for ${{ matrix.testMode }}-${{ matrix.unityVersion }}
path: ${{ steps.tests.outputs.artifactsPath }}

#BUILD
builds:
name: ${{ matrix.targetPlatform }}-${{ matrix.unityVersion }}
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
targetPlatform:
- StandaloneWindows
#- WebGL
unityVersion:
- 2019.3.15f1
- 2019.4.40f1
- 2020.3.48f1
- 2021.3.37f1
- 2022.3.24f1
- 2023.2.18f1

include:
- targetPlatform: WebGL
unityVersion: 2019.3.15f1
- targetPlatform: WebGL
unityVersion: 2023.2.18f1


steps:
#Build Checkout
- uses: actions/[email protected]
with:
fetch-depth: 0
lfs: true

#Build Cache
- uses: actions/[email protected]
with:
path: Library
key: Library-${{ matrix.unityVersion }}
restore-keys:
Library-${{ matrix.unityVersion }}

#Build
- uses: game-ci/[email protected]
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: ${{ matrix.targetPlatform }}
unityVersion: ${{ matrix.unityVersion }}
customParameters: '-nographics'

#Build Artifact
- uses: actions/[email protected]
with:
name: Build-${{ matrix.targetPlatform }}-${{ matrix.unityVersion }}
path: build/${{ matrix.targetPlatform }}
path: ${{ steps.tests.outputs.artifactsPath }}
63 changes: 63 additions & 0 deletions .github/workflows/unity-builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Unity Builder

on: [push, pull_request, workflow_dispatch]

jobs:

#BUILD
builds:
name: Build-${{ matrix.targetPlatform }}-${{ matrix.unityVersion }}
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
targetPlatform:
- StandaloneWindows
#- WebGL
unityVersion:
- 2019.3.15f1
- 2019.4.40f1
- 2020.3.48f1
- 2021.3.37f1
- 2022.3.24f1
- 2023.2.18f1

include:
- targetPlatform: WebGL
unityVersion: 2019.3.15f1
- targetPlatform: WebGL
unityVersion: 2023.2.18f1


steps:
#Build Checkout
- uses: actions/[email protected]
with:
fetch-depth: 0
lfs: true

#Build Cache
- uses: actions/[email protected]
with:
path: Library
key: Library-${{ matrix.unityVersion }}
restore-keys:
Library-${{ matrix.unityVersion }}

#Build
- uses: game-ci/[email protected]
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: ${{ matrix.targetPlatform }}
unityVersion: ${{ matrix.unityVersion }}
customParameters: '-nographics'

#Build Artifact
- uses: actions/[email protected]
with:
name: Build-${{ matrix.targetPlatform }}-${{ matrix.unityVersion }}
path: build/${{ matrix.targetPlatform }}
45 changes: 45 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"tagFormat": "${version}",
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "angular",
"releaseRules": [
{ "type": "docs", "scope": "README", "release": "patch" },
{ "type": "refactor", "release": "patch" },
{ "type": "style", "release": "patch" }
],
"parserOpts": {
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES"]
}
}
],

"@semantic-release/release-notes-generator",

[
"@semantic-release/changelog",
{
"preset": "angular"
}
],

[
"@semantic-release/npm",
{
"npmPublish": false
}
],

[
"@semantic-release/git",
{
"assets": ["package.json", "CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],

"@semantic-release/github"
]
}

0 comments on commit ad909b8

Please sign in to comment.