Skip to content

Commit

Permalink
release: Rollup Release
Browse files Browse the repository at this point in the history
Includes all commits since 5.1
  • Loading branch information
MrGadget1024 committed Apr 13, 2024
1 parent 8d5b02a commit 68e7518
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 46 deletions.
17 changes: 4 additions & 13 deletions .github/workflows/Semantic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ jobs:
with:
fetch-depth: 0

- name: Exclude package.json files
run: |
Remove-Item -Recurse -Force com.mirror.steamworks.net\package.json
Remove-Item -Recurse -Force com.mirror.steamworks.net\package.json.meta
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
Expand All @@ -43,15 +38,11 @@ jobs:
# Installs nuget package from https://www.nuget.org/packages/unity-packer
- name: Install unity-packer
run: dotnet tool install -g unity-packer

- name: Package
run: unity-packer pack FizzySteamworks.unitypackage com.mirror.steamworks.net Assets/Mirror/Transports/FizzySteamworks

- uses: actions/upload-artifact@v4
with:
name: FizzySteamworks.unitypackage
path: FizzySteamworks.unitypackage

# Install conventional-changelog-conventionalcommits
- name: Install conventional-changelog-conventionalcommits
run: npm i -D conventional-changelog-conventionalcommits

- name: Release
uses: cycjimmy/semantic-release-action@v4
with:
Expand Down
96 changes: 63 additions & 33 deletions .releaserc.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,63 @@
{
verifyConditions: ["@semantic-release/github"],
prepare: [
{
"path": "@semantic-release/exec",
"prepareCmd": "echo ${nextRelease.version} > com.mirror.steamworks.net/version.txt"
}
],
publish: [
{
"path": "@semantic-release/github",
"assets": [
{"path": "FizzySteamworks.unitypackage", "label": "FizzySteamworks Unity Package", "name": "FizzySteamworks-${nextRelease.version}.unitypackage"}
]
}
],
"plugins": [
["@semantic-release/commit-analyzer", {
"preset": "angular",
"releaseRules": [
{"type": "breaking", "release": "major"},
{"type": "feature", "release": "minor"},
]
}],
['@semantic-release/release-notes-generator', {
"preset": "angular",
"releaseRules": [
{"type": "breaking", "release": "major"},
{"type": "feature", "release": "minor"},
]
}],
]
}
verifyConditions:
- "@semantic-release/github"

plugins:
- - '@semantic-release/commit-analyzer'
- preset: "angular"
releaseRules:
- type: "breaking"
release: "major"
- type: "release"
release: "major"
- type: "feature"
release: "minor"

- - '@semantic-release/release-notes-generator'
- preset: "conventionalcommits"
presetConfig:
types:
- type: "breaking"
section: "Breaking Changes"
hidden: false
- type: "release"
section: "Release"
hidden: false
- type: "feature"
section: "Features"
hidden: false

# Update the version in the package.json file
- - '@semantic-release/npm'
- npmPublish: false
pkgRoot: "com.mirror.steamworks.net"

# Write the new version in version.txt
- - '@semantic-release/exec'
- prepareCmd: "echo ${nextRelease.version} > com.mirror.steamworks.net/version.txt"

# Temporarily move package files to root folder to exclude from normal .unitypackage
- - '@semantic-release/exec'
- prepareCmd: "mv com.mirror.steamworks.net/package.json package.json
&& mv com.mirror.steamworks.net/package.json.meta package.json.meta"

# Create Unity Package
- - '@semantic-release/exec'
- prepareCmd: "unity-packer pack FizzySteamworks.unitypackage com.mirror.steamworks.net Assets/Mirror/Transports/FizzySteamworks"

# Move package files back
- - '@semantic-release/exec'
- prepareCmd: "mv package.json com.mirror.steamworks.net/package.json
&& mv package.json.meta com.mirror.steamworks.net/package.json.meta "

# Commit changes where version was updated
- - '@semantic-release/git'
- assets:
- 'com.mirror.steamworks.net/version.txt'
- 'com.mirror.steamworks.net/package.json'

# Create a new release on GitHub
- - '@semantic-release/github'
- assets:
- path: "FizzySteamworks.unitypackage"
label: "FizzySteamworks Unity Package"
name: "FizzySteamworks-${nextRelease.version}.unitypackage"
1 change: 1 addition & 0 deletions com.mirror.steamworks.net/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.1.0

0 comments on commit 68e7518

Please sign in to comment.