This repository (SchellGamesInternal/.github) serves as the central configuration and workflow repository for SchellGamesInternal. It hosts reusable GitHub Actions workflows and master template files injected at runtime into organization package repositories.
.github/
├── .github/
│ └── workflows/
│ └── reusable-upm-publish.yml # Central UPM pack & publish workflow
└── templates/
└── .npmignore # Master template for UPM packages
Dynamically injected into consumer package repositories before packaging.
- Excludes: Local workspace folders (
/Library/,/Temp/), build outputs, IDE solution files, and internal test assemblies (/Tests/). - Preserves: All critical Unity YAML
.metafiles required for package integrity.
A centralized GitHub Actions workflow triggered by individual package repositories. It performs the following automated tasks:
- Clones this configuration repository to fetch master templates.
- Injects
.npmignoreand dynamically updatespackage.jsonwith the target Verdaccio registry URL. - Determines the NPM release tag based on Git tag naming conventions (
preview,alpha,beta,rc, orlatest). - Packs the Unity package via the host machine's Unity UPM CLI (
C:\upm\bin\upm.exe). - Authenticates and publishes the
.tgzartifact to the internal Verdaccio registry.
Package repositories do not need duplicate CI pipeline code. Add a workflow file at .github/workflows/publish.yml in any package repository to reference this pipeline:
name: Publish Package
on:
push:
tags:
- 'v*'
jobs:
publish:
uses: SchellGamesInternal/.github/.github/workflows/reusable-upm-publish.yml@main
secrets:
UPM_SERVICE_ACCOUNT_KEY_ID: ${{ secrets.UPM_SERVICE_ACCOUNT_KEY_ID }}
UPM_SERVICE_ACCOUNT_KEY_SECRET: ${{ secrets.UPM_SERVICE_ACCOUNT_KEY_SECRET }}
UPM_ORGANIZATION_ID: ${{ secrets.UPM_ORGANIZATION_ID }}
VERDACCIO_TOKEN: ${{ secrets.VERDACCIO_TOKEN }}This workflow relies on self-hosted runners labeled [self-hosted, Windows, X64, upm-runner] and requires the following Organization-level secrets to be configured in GitHub:
| Secret Name | Description |
|---|---|
UPM_SERVICE_ACCOUNT_KEY_ID |
Service Account ID for Unity UPM CLI authentication. |
UPM_SERVICE_ACCOUNT_KEY_SECRET |
Service Account Key Secret for Unity UPM CLI. |
UPM_ORGANIZATION_ID |
Schell Games Unity Organization ID. |
VERDACCIO_TOKEN |
Authentication token for the private Verdaccio package registry. |
Permissions Note: Ensure Organization Settings > Actions > General has Workflow permissions set to "Read and write permissions" and Access set to "Accessible from repositories in the 'SchellGamesInternal' organization" to allow cross-repository workflow access.