diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bf7e337..40611df 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,9 +8,6 @@ on: jobs: Release: - env: - TARGET_NAME: SimpleWebTransport - SOURCE_PATH: SimpleWebTransport runs-on: windows-latest # needs: Tests steps: @@ -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: diff --git a/.releaserc.yml b/.releaserc.yml index 9de3689..8de8ce1 100644 --- a/.releaserc.yml +++ b/.releaserc.yml @@ -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" \ No newline at end of file