Skip to content

Commit 6a3af0a

Browse files
committed
Improve README for UPM signing example [skip ci]
1 parent a6e8195 commit 6a3af0a

1 file changed

Lines changed: 23 additions & 14 deletions

File tree

README.md

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,19 @@ packed and signed in GitHub Actions, then published as a GitHub Release asset.
55
It is intentionally small so package authors can copy the workflow into their
66
own repositories without carrying unrelated project structure.
77

8-
Unity 6.3 checks digital signatures on tarball packages. The `upm pack`
9-
command creates a `.tgz` archive from the package folder and signs it with a
10-
Unity organization through service account credentials. The signed tarball can
11-
then be distributed directly, uploaded to a release, or submitted to a registry
12-
workflow that consumes release assets.
8+
Unity 6.3 provides the UPM CLI, a command-line tool for package operations such
9+
as packing and signing. See the
10+
[Unity UPM CLI documentation](https://docs.unity3d.com/6000.3/Documentation/Manual/upm-cli.html)
11+
for installation and command details.
12+
13+
The `upm pack` command creates a `.tgz` archive from the package folder and
14+
signs it with a Unity organization through service account credentials. A
15+
signed UPM package contains `package/.attestation.p7m` inside the archive. The
16+
resulting `.tgz` file can be published to a registry such as OpenUPM.
1317

1418
## Package Layout
1519

1620
- `package/package.json` is the Unity package manifest.
17-
- `package/package.json.meta` is the Unity meta file for the manifest.
1821
- `.github/workflows/ci.yml` signs the package only when a tag is pushed.
1922

2023
The package has no runtime code. It exists only to demonstrate release
@@ -44,20 +47,26 @@ git tag 1.0.0
4447
git push origin main 1.0.0
4548
```
4649

47-
The workflow installs Unity UPM CLI, runs `upm pack ./package`, verifies that
48-
the archive contains `package/package.json` for `com.example.signed-upm@1.0.0`,
49-
and attaches the signed tarball to the matching GitHub Release.
50+
The workflow only runs for pushed git tags. For tag `1.0.0`, it creates a
51+
GitHub Release with the same tag name, installs Unity UPM CLI, and runs
52+
`upm pack ./package` to create a signed UPM `.tgz` file. The signed archive
53+
contains `package/.attestation.p7m` for the package signature. The workflow
54+
also verifies that the archive contains `package/package.json` for
55+
`com.example.signed-upm@1.0.0`, then attaches the signed tarball to the release.
5056

5157
## OpenUPM
5258

53-
To publish a signed GitHub Release asset through OpenUPM, submit the package
54-
metadata with `trackingMode: githubRelease` and set `githubReleaseAssetName` to
55-
the signed archive filename, for example:
59+
To publish a signed GitHub Release asset through OpenUPM, submit package
60+
metadata with `trackingMode: githubRelease`:
5661

5762
```yaml
5863
trackingMode: githubRelease
59-
githubReleaseAssetName: com.example.signed-upm-1.0.0.tgz
6064
```
6165
62-
OpenUPM will download the public release asset instead of packing from the git
66+
When a release has only one `.tgz` or `.tar.gz` asset, OpenUPM selects it
67+
automatically. Set `githubReleaseAssetName` only when a release has multiple
68+
assets. The value can be either the exact signed package filename or a stable
69+
filename prefix when the filename contains the version string.
70+
71+
OpenUPM downloads the public release asset instead of packing from the git
6372
checkout.

0 commit comments

Comments
 (0)