actions-upm-publish
actions-upm-publish copied to clipboard
GitHub Actions to publish Unity packages to Unity Package Manager Registry
GitHub Action for publish UPM
Features
- Publish Unity Packages to UPM registry
- Automatic edit
package.jsonandCHANGELOG.md
Prepare
1. Setup Secrets in Repository Settings
- Open Secrets settings

- Add new secrets: Name:
NPM_AUTH_TOKEN, Value: Your auth token of UPM Registry
- Add new secrets: Name:
NPM_REGISTRY_URL, Value: Your UPM Registry URL.
2. Setup GitHub Actions Workflow
Setup GitHub Actions Workflow as below example.
name: Publish UPM Package
on:
release:
types: [published]
jobs:
upm-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: monry/actions-upm-publish@v1
with:
npm_registry_url: ${{ secrets.NPM_REGISTRY_URL }}
npm_auth_token: ${{ secrets.NPM_AUTH_TOKEN }}
You can specify directory path of package.json by set path into package_directory_path (default: Assets)
Note: Registry URL
You can also specify registry URL using .npmrc instead of specifying in actions workflow.
registry=[UPM Registry URL]
Usages
When you create a new release on GitHub, Actions are executed to do the following:
- Update
versionfield inAssets/package.json - Add release notes into
Assets/CHANGELOG.md - Commit and Push to registry and replace hash of release tag