Skip to content
/ upm-template Public template

A template for making UPM based Unity packages

License

Notifications You must be signed in to change notification settings

adrenak/upm-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

upm-template

A template project for making UPM packages for Unity

How to use

First use this repository as the base of your UPM project repository by forking it.

Project Structure

Let's say the name of your package directory is ABC. Your UPM project directory will usually be Packages/ABC or Assets/ABC (let's assume it's Packages/ABC for this guide). A sample directory is included in the repo.

Inside which you'd have your package.json, CHANGELOG.md, LICENSE, README.md.

To know more about package.json (called the UPM Manifest) go here

Configure Github Actions (only works when hosting on github.com)

Go to .github/workflows/ci.yml and change the value of XYZ to Packages/ABC.

If your branch name differs from 'master' and is for example 'main' replace:

on:
  push:
    branches:
    - master

with:

on:
  push:
    branches:
    - main

Every time you commit to master, this YML file is used to release your UPM package and automatically use a separate upm branch for releases as well as autogenerate tag for release. If you see the upm branch commits, you'll notice that your project directory is the root instead of the Unity project directory. Github Actions is used to automate this bit.

Configure Semantic Release

Semantic releases is used to automate changelog updates as well as incrementing the version field inside package.json (the UPM Manifest).

Go to .releaserc.yml do make the following changes:

  • XYZ1 to Packages/ABC
  • XYZ2 to Packages/ABC/package.json
  • XYZ3 to Packages/ABC/CHANGELOG.md
  • 'PATH_TO_YOUR_CHANGELOG.MD' to Packages/ABC/CHANGELOG.md

When using git commit, follow the Angular Standard

Publishing to package registries

Use npm publish inside Packages/ABC or check out OpenUPM

Further Resources

Favo Yang's Medium Articles
OpenUPM Docs
Having a Docker Container As Your Private NPM Registry — The Easy Way by Sibeesh Venu

Contact

@github
@www

About

A template for making UPM based Unity packages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published