Skip to content

Commit 3c422bc

Browse files
authored
chore: set up release please (#10)
* chore: set up release-please * chore: release 0.9.0-rc.1 * chore: set up prerelease-type rc
1 parent 73da5ff commit 3c422bc

7 files changed

Lines changed: 80 additions & 21 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
6+
permissions:
7+
contents: write
8+
issues: write
9+
pull-requests: write
10+
11+
name: release-please
12+
13+
jobs:
14+
release-please:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: googleapis/release-please-action@v4
18+
with:
19+
target-branch: ${{ github.ref_name }}

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.9.0-rc.1"
3+
}

SDK/Runtime/Utils/SdkVersion.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ namespace Privy
22
{
33
public static class SdkVersion
44
{
5-
public const string VersionNumber = "0.7.1";
5+
// x-release-please-start-version
6+
public const string VersionNumber = "0.9.0-rc.1";
7+
// x-release-please-end
68
}
79
}

SDK/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "com.privy.unity-sdk",
33
"displayName": "Privy SDK",
4-
"version": "0.7.1",
4+
"version": "0.9.0-rc.1",
55
"unity": "2022.3",
66
"description": "Privy Unity SDK for authentication and embedded wallet functionality.",
77
"keywords": [

docs/releasing.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
The SDK is distributed primarily as a UPM package (`com.privy.unity-sdk`).
66
Consumers can obtain it via several mechanisms:
77

8-
* Clone/download `SDK/` into their project's `Assets` folder
9-
* Add as a git URL package in manifest.json (`"com.privy.unity-sdk": "https://github.com/<org>/unity-sdk.git?path=SDK"`)
10-
* Install via OpenUPM (`openupm add com.privy.unity-sdk`)
11-
8+
- Clone/download `SDK/` into their project's `Assets` folder
9+
- Add as a git URL package in manifest.json (`"com.privy.unity-sdk": "https://github.com/<org>/unity-sdk.git?path=SDK"`)
10+
- Install via OpenUPM (`openupm add com.privy.unity-sdk`)
1211

1312
### What the package includes
1413

@@ -19,24 +18,25 @@ Note: the package is structured as a standard UPM package. WebGL custom
1918
templates are copied via the installer script or manually placed in the
2019
consumer project; the package itself does not automatically install them.
2120

22-
### Versioning and export script
21+
### Versioning
2322

24-
The [VersionedExport](../SampleApp/Assets/Editor/VersionedExport.cs) script
25-
can be used to update the `version` field in `SDK/package.json` so it matches
26-
`SdkVersion.cs`. It is primarily used during development and is **not required
27-
for UPM distribution**.
23+
Versions are managed automatically by
24+
[release-please](https://github.com/googleapis/release-please). The version
25+
string lives in three places and is kept in sync by release-please:
2826

29-
Follow the normal tagging procedure (see below) to release a new package
30-
version.
27+
| File | Updater |
28+
| --------------------------------- | -------------------------------------- |
29+
| `version.txt` | `simple` (primary version file) |
30+
| `SDK/package.json` | `json` (`$.version`) |
31+
| `SDK/Runtime/Utils/SdkVersion.cs` | `generic` (`x-release-please` markers) |
3132

3233
### How to release
3334

34-
1. Make your changes to the SDK and update `SDK/Runtime/Utils/SdkVersion.cs`.
35-
2. Optionally run `tools/bump-version.*` to sync `package.json`.
36-
3. Commit your changes, tag the commit (e.g. `git tag v0.7.2`), and push to
37-
`main`.
38-
4. The GitHub workflow will validate the version and may perform additional
39-
publishing steps.
35+
1. Merge conventional-commit-formatted PRs into `main` (e.g. `feat:`, `fix:`).
36+
2. Release-please automatically opens (or updates) a release PR that bumps
37+
versions and updates `SDK/CHANGELOG.md`.
38+
3. Review the release PR and merge it when ready.
39+
4. On merge, release-please creates a GitHub Release and git tag.
4040

41-
For UPM releases, simply pushing the tag is sufficient; OpenUPM and Package
42-
Manager clients will pick up the new version automatically.
41+
For UPM releases, the tag is sufficient; OpenUPM and Package Manager clients
42+
will pick up the new version automatically.

release-please-config.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"packages": {
4+
".": {
5+
"release-type": "simple",
6+
"version-file": "version.txt",
7+
"extra-files": [
8+
{ "type": "json", "path": "SDK/package.json", "jsonpath": "$.version" },
9+
{ "type": "generic", "path": "SDK/Runtime/Utils/SdkVersion.cs" }
10+
],
11+
"changelog-path": "SDK/CHANGELOG.md",
12+
"changelog-sections": [
13+
{ "type": "feat", "section": "Added" },
14+
{ "type": "fix", "section": "Fixed" },
15+
{ "type": "perf", "section": "Performance", "hidden": false },
16+
{ "type": "deps", "section": "Dependencies", "hidden": false },
17+
{ "type": "revert", "section": "Reverted", "hidden": false },
18+
{ "type": "docs", "hidden": true },
19+
{ "type": "style", "hidden": true },
20+
{ "type": "chore", "hidden": true },
21+
{ "type": "refactor", "hidden": true },
22+
{ "type": "ci", "hidden": true },
23+
{ "type": "test", "hidden": true },
24+
{ "type": "build", "hidden": true }
25+
],
26+
"bump-minor-pre-major": false,
27+
"bump-patch-for-minor-pre-major": false,
28+
"draft": false,
29+
"prerelease": true,
30+
"prerelease-type": "rc"
31+
}
32+
},
33+
"versioning": "prerelease"
34+
}

version.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.9.0-rc.1

0 commit comments

Comments
 (0)