chore(CI): Attempt to fix CI package generation

This commit is contained in:
MrGadget 2024-06-12 16:23:05 -04:00
parent fe93f4e870
commit d14d32bb1b
2 changed files with 8 additions and 2 deletions

View File

@ -38,7 +38,7 @@ jobs:
- name: Release - name: Release
run: npx semantic-release run: npx semantic-release
--plugins "@semantic-release/commit-analyzer,@semantic-release/release-notes-generator,@semantic-release/exec,@semantic-release/github" # --plugins "@semantic-release/commit-analyzer,@semantic-release/release-notes-generator,@semantic-release/exec,@semantic-release/github"
--debug true # --debug true
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -6,6 +6,7 @@ plugins:
# See https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#type # See https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#type
# More types can be added here and in release-notes-generator below. # More types can be added here and in release-notes-generator below.
- - '@semantic-release/commit-analyzer' - - '@semantic-release/commit-analyzer'
- debug: true
- preset: "angular" - preset: "angular"
releaseRules: releaseRules:
- type: "breaking" - type: "breaking"
@ -19,6 +20,7 @@ plugins:
# 'fix' and 'feat' are built in and don't need to be defined here. # 'fix' and 'feat' are built in and don't need to be defined here.
# More types can be added to correspond with commit-analyzer above. # More types can be added to correspond with commit-analyzer above.
- - '@semantic-release/release-notes-generator' - - '@semantic-release/release-notes-generator'
- debug: true
- preset: "conventionalcommits" - preset: "conventionalcommits"
presetConfig: presetConfig:
types: types:
@ -40,19 +42,23 @@ plugins:
# Write the new version in version.txt # Write the new version in version.txt
- - '@semantic-release/exec' - - '@semantic-release/exec'
- debug: true
- prepareCmd: "echo ${nextRelease.version} > Assets/Mirror/version.txt" - prepareCmd: "echo ${nextRelease.version} > Assets/Mirror/version.txt"
# Remove Test folder so it's excluded from Unity package # Remove Test folder so it's excluded from Unity package
# -f: force, -r: recursive # -f: force, -r: recursive
- - '@semantic-release/exec' - - '@semantic-release/exec'
- debug: true
- prepareCmd: "rm -f -r Assets/Mirror/Tests && rm -f Assets/Mirror/Tests.meta" - prepareCmd: "rm -f -r Assets/Mirror/Tests && rm -f Assets/Mirror/Tests.meta"
# Create Unity package with Mirror, ScriptTemplates, and LICENSE # Create Unity package with Mirror, ScriptTemplates, and LICENSE
- - '@semantic-release/exec' - - '@semantic-release/exec'
- debug: true
- prepareCmd: "unity-packer pack Mirror.unitypackage Assets/Mirror Assets/Mirror Assets/ScriptTemplates Assets/ScriptTemplates LICENSE Assets/Mirror/LICENSE" - prepareCmd: "unity-packer pack Mirror.unitypackage Assets/Mirror Assets/Mirror Assets/ScriptTemplates Assets/ScriptTemplates LICENSE Assets/Mirror/LICENSE"
# Create a new release on GitHub # Create a new release on GitHub
- - '@semantic-release/github' - - '@semantic-release/github'
- debug: true
- assets: - assets:
- path: "Mirror.unitypackage" - path: "Mirror.unitypackage"
label: "Mirror Unity Package" label: "Mirror Unity Package"