Skip to content

openupm/com.example.openupm-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

com.example.openupm-action

Example Unity package repository for the openupm/openupm-action publish wait GitHub Action.

This repository demonstrates the anonymous OpenUPM publishing flow from a tag push. It is intentionally a tag-push workflow demo:

  1. Push a Git tag that contains a parseable semver package version.
  2. GitHub Actions requests a GitHub OIDC token for the openupm audience.
  3. openupm/openupm-action asks OpenUPM to scan this registered repository.
  4. The workflow waits until that package version is installable or fails with the OpenUPM release reason.

No OpenUPM account, personal access token, or repository secret is required.

Package

The package is stored in package/ and uses the package name com.example.openupm-action.

Tag Push Demo

The included .github/workflows/openupm.yml workflow runs for tags. Send a tag to openupm/openupm-action only when the tag contains a parseable semver package version, such as 1.0.0, v1.0.0, upm/1.0.0, or com.example.openupm-action@v1.0.0:

git tag 1.0.0
git push origin 1.0.0

The tag name is passed to the action. Tags without a parseable semver package version are rejected before the action contacts OpenUPM:

- uses: openupm/openupm-action@v1
  with:
    package: com.example.openupm-action
    tag: ${{ github.ref_name }}

The workflow grants:

permissions:
  id-token: write
  contents: read

id-token: write lets the action request the short-lived GitHub OIDC token that OpenUPM verifies.

GitHub Release Variant

The same action can run after a GitHub Release is published. For packages that use GitHub Release asset tracking, including signed packages, first follow the release asset tracking and signing guide for trackingMode: githubRelease and asset selection. Then use the OpenUPM Action trigger guidance to notify OpenUPM only after the package asset is attached to the release.

name: OpenUPM

on:
  release:
    types: [published]

permissions:
  id-token: write
  contents: read

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: openupm/openupm-action@v1
        with:
          package: com.example.openupm-action
          tag: ${{ github.event.release.tag_name }}

Release tags follow the same rule: use a tag that contains a parseable semver package version, or the action fails before contacting OpenUPM.

About

Example Unity package demonstrating the OpenUPM publish wait GitHub Action

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages