Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: simple

- uses: game-ci/unity-builder@v2
if: ${{ steps.release.outputs.release_created }}
env:
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
unityVersion: 2022.3.19f1
buildMethod: ExportPackage.Export
customImage: "unityci/editor:ubuntu-2022.3.19f1-base-3"

- name: Upload Release Artifact
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ steps.release.outputs.tag_name }} Rivet.unitypackage
18 changes: 18 additions & 0 deletions Assets/Rivet/Editor/ExportPlugin.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System.Linq;
using UnityEditor;

/// <summary>
/// Represents a class that exports a package containing assets related to the Rivet plugin.
/// </summary>
public class ExportPackage
{
/// <summary>
/// Exports the assets related to the Rivet plugin as a Unity package.
/// </summary>
public static void Export()
{
string[] projectContent = AssetDatabase.GetAllAssetPaths();
var assetsToExport = projectContent.Where(path => path.StartsWith("Assets/Rivet")).ToArray();
AssetDatabase.ExportPackage(assetsToExport, "Rivet.unitypackage", ExportPackageOptions.Recurse);
}
}
11 changes: 11 additions & 0 deletions Assets/Rivet/Editor/ExportPlugin.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.