npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

com.playdarium.unity.build-pipeline

v1.0.11

Published

This package help with create build pipelines and trigger build on GitLab CI remotely

Downloads

49

Readme

Build Pipeline

NPM package License: MIT

Installing

Using the native Unity Package Manager introduced in 2017.2, you can add this library as a package by modifying your manifest.json file found at /ProjectName/Packages/manifest.json to include it as a dependency. See the example below on how to reference it.

Install via UPM

The package is available on the npmjs registry.

Add registry scope

{
  "dependencies": {
    ...
  },
  "scopedRegistries": [
    {
      "name": "Playdarium",
      "url": "https://registry.npmjs.org",
      "scopes": [
        "com.playdarium.unity"
      ]
    }
  ]
}

Add package in PackageManager

Open Window -> Package Manager choose Packages: My Regestries and install package

Install via GIT URL

"com.playdarium.unity.build-pipeline": "https://gitlab.com/pd-packages/build-pipeline.git#upm"

Get started


All resources for build must be located in the Editor resources folder.

  1. Create from Create -> BuildPipeline -> BuildProjectPipeline.
  2. Setup pipeline name.
  3. Setup build target.
  4. Configure your own pipeline steps.
  5. Launch build you can from menu Tools -> Build Pipelines

BuildProjectPipeline

| Field name | Description | |---------------|--------------------------------------------------------------| | Pipeline Name | This name should be unique and using for invoke remote build | | Build Target | Using for build grouping in Build Pipelines window | | Steps | Pipeline steps for configure and build project |

Predefined steps

| Step name | Description | |-------------------------------|--------------------------------------------------------| | ProductName | Set product name | | PackageName | Set package name for selected platform | | KeystoreAndAlias | Set keystore and alias | | Define | Set defines for selected platform | | LogLevel | Set log level | | BuildAppBundle | Build apk or aab (Android) | | ScriptingBackendAndroidMono | Set scripting backend android to mono | | ScriptingBackendAndroidIL2CPP | Set scripting backend android to IL2CPP | | BuildAndStore | Setup configuration in scriptable object BuildSettings | | AddBuildCountToVersion | Used in Android for build Debug version | | SetIOSBuildNumber | Used for change build number on build agent | | UnityLogo | Enable or disable unity logo in build | | SceneToBuild | Provide scene path to build | | AndroidBuild | Execute build Android project | | iOSBuild | Export iOS project for XCode |

Configure default pipelines


Create directories:

  • BuildPipleines -> Editor -> Resporces -> Pipelines
  • BuildPipleines -> Editor -> Resporces -> Steps

In Resources create scriptable object Create -> Settings -> BuildSettings

Android pipelines


Create 3 different pipelines Create -> BuildPipeline -> BuildProjectPipeline

  • AndroidDebug
  • AndroidReleaseAPK
  • AndroidReleaseAAB

Add to this pipelines steps Create -> BuildPipeline -> Steps

AndroidDebug

| Step Name | Value | |-----------------------------|--------------------------------------------------------------| | BuildAndStore | BuildType: Debug StoreType: GooglePlay | | KeystoreAndAlias | Empty | | BuildAppBundle | False | | ScriptingBackendAndroidMono | - | | AddBuildCountToVersion | - | | UnityLogo | False | | SceneToBuild | Scenes in project | | AndroidBuild | ProjectPrefix: [custom_value] BuildOptions: Development |


AndroidReleaseAPK

| Step Name | Value | |-------------------------------|-------------------------------------------------------| | BuildAndStore | BuildType: Release StoreType: GooglePlay | | KeystoreAndAlias | Set your values | | BuildAppBundle | False | | ScriptingBackendAndroidIL2CPP | - | | UnityLogo | False | | SceneToBuild | Scenes in project | | AndroidBuild | ProjectPrefix: [custom_value] BuildOptions: None |


AndroidReleaseAAB

| Step Name | Value | |-------------------------------|-------------------------------------------------------| | BuildAndStore | BuildType: Release StoreType: GooglePlay | | KeystoreAndAlias | Set your values | | BuildAppBundle | True | | ScriptingBackendAndroidIL2CPP | - | | UnityLogo | False | | SceneToBuild | Scenes in project | | AndroidBuild | ProjectPrefix: [custom_value] BuildOptions: None |


iOS pipelines


Prepare Unity project


Disable Unity Cloud Diagnostics

For avoid exception when XCode build project:

Please provide an auth token with USYM_UPLOAD_AUTH_TOKEN environment variable
  1. On the menu bar, select Window > General, then select Services.
  2. In the Services window, select Cloud Diagnostics.
  3. Disable Cloud Diagnostics.

Create pipelines

Create 3 different pipelines Create -> BuildPipeline -> BuildProjectPipeline

  • iOSDebugBuild
  • iOSReleaseBuild

Add to this pipelines steps Create -> BuildPipeline -> Steps

iOSDebugBuild

| Step Name | Value | |-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | BuildAndStore | BuildType: Debug StoreType: iOS | | SetIOSBuildNumber | - | | UnityLogo | False | | SceneToBuild | Scenes in project | | iOSBuild | ProjectPrefix: [custom_value] BuildOptions: Development BuildType: Debug ExportOptionsEnabled: True CompileBitcode: False StripSwiftSymbols: True DevelopmentProvision: [path_to_file] DistributionProvision: [path_to_file] |


iOSReleaseBuild

| Step Name | Value | |-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | BuildAndStore | BuildType: Release StoreType: iOS | | SetIOSBuildNumber | - | | UnityLogo | False | | SceneToBuild | Scenes in project | | iOSBuild | ProjectPrefix: [custom_value] BuildOptions: None BuildType: Release ExportOptionsEnabled: True CompileBitcode: True StripSwiftSymbols: True DevelopmentProvision: [path_to_file] DistributionProvision: [path_to_file] |


Customize pipeline steps

For create you own build pipeline step you must implement APipelineStep and override method:
public override void Execute(BuildParameterHolder parameterHolder, Action onComplete)

Your pipeline step can execute a recompile project and BuildPipelineExecutor restore a building process after assembly reload.

If you need provide some variables between steps use BuildParameterHolder.
For serialization BuildParameterHolder use BinaryFormatter .

Execute build pipeline from builder

Launch unity with arguments:

-executeMethod Playdarium.BuildPipelines.BuildPipelineExecutor.Build -pipelineName [PipelineName] -buildPath [BuildPath]