forked from Raystorms/FizzySteamyMirror
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from MrGadget1024/master
feat: Add Semantic Release
- Loading branch information
Showing
3 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Semantic Release | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- master | ||
paths-ignore: | ||
- '.github/**' | ||
- '.gitattributes' | ||
- '.gitignore' | ||
- '**.md' | ||
push: | ||
branches: | ||
- master | ||
paths-ignore: | ||
- '.github/**' | ||
- '.gitattributes' | ||
- '.gitignore' | ||
- '**.md' | ||
|
||
jobs: | ||
SemanticRelease: | ||
name: Semantic Release | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup dotnet | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: '3.1.100' | ||
|
||
# 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 | ||
|
||
- name: Release | ||
uses: cycjimmy/semantic-release-action@v4 | ||
with: | ||
extra_plugins: | | ||
@semantic-release/exec | ||
@semantic-release/changelog | ||
@semantic-release/git | ||
branch: master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
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"}, | ||
] | ||
}], | ||
] | ||
} |