Skip to content

Commit

Permalink
ci: adding unitypackage to release
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Frowen committed Apr 11, 2024
1 parent be8a559 commit 5c0feaa
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ on:

jobs:
Release:
env:
TARGET_NAME: SimpleWebTransport
SOURCE_PATH: SimpleWebTransport
runs-on: windows-latest
# needs: Tests
steps:
Expand All @@ -28,18 +25,6 @@ jobs:
- name: Install unity-packer
run: dotnet tool install -g unity-packer

- name: Package

run: >-
unity-packer pack ${{ env.TARGET_NAME }}.unitypackage
source ${{ env.SOURCE_PATH }}/scripts
LICENSE ${{ env.SOURCE_PATH }}/LICENSE
- uses: actions/upload-artifact@v1
with:
name: ${{ env.TARGET_NAME }}.unitypackage
path: ${{ env.TARGET_NAME }}.unitypackage

- name: Release
uses: cycjimmy/semantic-release-action@v3
with:
Expand Down
22 changes: 21 additions & 1 deletion .releaserc.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,37 @@
plugins:
- '@semantic-release/github'
- '@semantic-release/release-notes-generator'
- '@semantic-release/commit-analyzer'

- - '@semantic-release/exec'
- prepareCmd: "sed -i -e '/AssemblyVersion/s/\".*\"/\"${nextRelease.version}\"/'
source/Runtime/AssemblyInfo.cs"

- - '@semantic-release/changelog'
- changelogFile: 'source/CHANGELOG.md'

- - '@semantic-release/npm'
- npmPublish: false
pkgRoot: "source"

- - '@semantic-release/exec'
- prepareCmd: "unity-packer pack SimpleWebTransport.unitypackage
source Assets/SimpleWebTransport/scripts
LICENSE Assets/SimpleWebTransport/LICENSE"

- - '@semantic-release/exec'
- prepareCmd: "unity-packer pack SimpleWebTransport_Mirror.unitypackage
source Assets/Mirror/Transports/SimpleWeb
LICENSE Assets/Mirror/Transports/SimpleWeb/LICENSE
Mirror/SimpleWebTransport.cs Assets/Mirror/Transports/SimpleWeb/SimpleWebTransport.cs"

- - '@semantic-release/git'
- assets:
- 'source/Runtime/AssemblyInfo.cs'
- 'source/package.json'
- 'source/CHANGELOG.md'

- - "@semantic-release/github"
- assets:
- path: "SimpleWebTransport.unitypackage"
label: "SimpleWebTransport Unity Package"
name: "SimpleWebTransport-${nextRelease.version}.unitypackage"

0 comments on commit 5c0feaa

Please sign in to comment.