Skip to content

Commit d09c72a

Browse files
Merge branch 'develop-2.0.0' into minimal-supported-editor-correction
2 parents f98e752 + f052a45 commit d09c72a

File tree

14 files changed

+148
-75
lines changed

14 files changed

+148
-75
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ AssemblyInfo.cs @NoelStephensUnity @EmandM @Unity-Technologies/netcode-qa
1010
.github/ @NoelStephensUnity @EmandM @Unity-Technologies/netcode-qa
1111
.yamato/ @NoelStephensUnity @EmandM @Unity-Technologies/netcode-qa
1212
com.unity.netcode.gameobjects/Documentation*/ @jabbacakes
13+
com.unity.netcode.gameobjects/Runtime/Transports/UTP/ @Unity-Technologies/multiplayer-workflows

.github/workflows/pr-description-validation.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,21 @@ jobs:
2929
script: |
3030
const pr = context.payload.pull_request;
3131
const body = pr.body || '';
32+
33+
// List of users to skip description validation
34+
// This should be automations where we don't care that much about the description format
35+
const skipUsersPrefixes = [
36+
'unity-renovate',
37+
'svc-'
38+
];
39+
40+
// If PR author is in the skip list, exit early
41+
const author = pr.user.login;
42+
console.log(`PR author: ${author}`);
43+
if (skipUsersPrefixes.some(prefix => author.startsWith(prefix))) {
44+
console.log(`Skipping PR description check for user: ${author}`);
45+
return;
46+
}
3247
3348
// List of mandatory PR sections
3449
const requiredSections = [

.yamato/ngo-publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
ngo_release_preparation:
22
name: "NGO release preparation"
33
agent: { type: Unity::VM, flavor: b1.small, image: package-ci/ubuntu-22.04:v4 }
4-
#triggers:
5-
# recurring:
6-
# - branch: develop-2.0.0 # We make new releases from this branch
7-
# frequency: "10 ? * 1" # Runs every Sunday at 10:00 AM
4+
triggers:
5+
recurring:
6+
- branch: develop-2.0.0 # We make new releases from this branch
7+
frequency: "10 ? * 1" # Runs every Sunday at 10:00 AM
88
commands:
99
- pip install PyGithub
1010
- pip install GitPython

.yamato/project.metafile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ test_platforms:
8484
type: Unity::VM::osx
8585
image: package-ci/macos-13:v4
8686
flavor: m1.mac
87+
larger_flavor: m1.mac
8788
standalone: IOS
8889
base: mac
8990
architecture: arm64

Tools/CI/regenerate.bat

Lines changed: 0 additions & 2 deletions
This file was deleted.

Tools/CI/regenerate.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

Tools/regenerate-ci.cmd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@echo off
2+
3+
cd /d "%~dp0.."
4+
dotnet run --project "Tools\CI\NGO.Cookbook.csproj" %*
5+
if %errorlevel% neq 0 exit /b %errorlevel%

Tools/regenerate-ci.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
3+
set -e # fail on first error
4+
5+
SCRIPT_DIR=$(dirname "$0")
6+
dotnet run --project $SCRIPT_DIR/CI/NGO.Cookbook.csproj "$@"

Tools/scripts/ReleaseAutomation/release_config.py

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,23 @@ def is_branch_present(self, branch_name):
2727
if ghe.status == 404:
2828
return False # Branch does not exist
2929
raise Exception(f"An error occurred with the GitHub API: {ghe.status}", data=ghe.data)
30+
31+
def create_pull_request(self, title, body, head, base):
32+
try:
33+
return self.repo.create_pull(title=title, body=body, head=head, base=base)
34+
35+
except GithubException as ghe:
36+
raise Exception(f"Failed to create pull request: {ghe.status}", ghe.data) from ghe
37+
38+
def request_reviews(self, pr, reviewers):
39+
if not reviewers:
40+
return
41+
42+
try:
43+
pr.create_review_request(reviewers=reviewers)
44+
except GithubException as ghe:
45+
raise Exception(f"Failed to request reviews: {ghe.status}", ghe.data) from ghe
46+
3047

3148
class ReleaseConfig:
3249
"""A simple class to hold all shared configuration."""
@@ -45,7 +62,17 @@ def __init__(self):
4562

4663
self.package_version = get_package_version_from_manifest(self.manifest_path)
4764
self.release_branch_name = f"release/{self.package_version}" # Branch from which we want to release
48-
self.commit_message = f"Updated changelog and package version for Netcode in anticipation of v{self.package_version} release"
65+
66+
self.release_commit_message = f"Updated changelog and package version for Netcode in anticipation of v{self.package_version} release"
67+
68+
self.pr_branch_name = f"netcode-update-after-{self.package_version}-release-branch-creation" # Branch from which we will create PR to default branch with relevant changes after release branch is created
69+
self.pr_commit_message = f"chore: Updated aspects of Netcode package in anticipation of v{self.package_version} release"
70+
self.pr_body = f"This PR was created in sync with branching of {self.release_branch_name}. It includes changes that should land on the default Netcode branch ({self.default_repo_branch}) to reflect the new state of the package after the v{self.package_version} release:\n" \
71+
f"1) Updated CHANGELOG.md by adding new [Unreleased] section template at the top and cleaning the Changelog for the current release.\n" \
72+
f"2) Updated package version in package.json by incrementing the patch version to signify the current state of the package.\n" \
73+
f"3) Updated package version in ValidationExceptions.json to match the new package version.\n\n" \
74+
f"Please review and merge this PR to keep the default branch up to date with the latest package state after the release. Those changes can land immediately OR after the release was finalized but make sure that the Changelog will be merged correctly as sometimes some discrepancies may be introduced due to new entries being introduced meantime\n"
75+
self.pr_reviewers = ["michal-chrobot"]
4976

5077
GITHUB_TOKEN_NAME = "NETCODE_GITHUB_TOKEN"
5178
YAMATO_API_KEY_NAME = "NETCODE_YAMATO_API_KEY"

Tools/scripts/ReleaseAutomation/run_release_preparation.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
sys.path.insert(0, PARENT_DIR)
88

99
from ReleaseAutomation.release_config import ReleaseConfig
10-
from Utils.git_utils import create_branch_execute_commands_and_push
10+
from Utils.git_utils import create_release_branch
1111
from Utils.verifyReleaseConditions import verifyReleaseConditions
12-
from Utils.commitChangelogAndPackageVersionUpdates import commitChangelogAndPackageVersionUpdates
12+
from Utils.createPrAfterRelease import createPrAfterRelease
1313
from Utils.triggerYamatoJobsForReleasePreparation import trigger_release_preparation_jobs
1414

1515
def PrepareNetcodePackageForRelease():
@@ -27,13 +27,13 @@ def PrepareNetcodePackageForRelease():
2727

2828
try:
2929
print("\nStep 2: Creating release branch...")
30-
create_branch_execute_commands_and_push(config)
30+
create_release_branch(config)
3131

3232
print("\nStep 3: Triggering Yamato validation jobs...")
3333
trigger_release_preparation_jobs(config)
3434

35-
print("\nStep 4: Committing changelog and version updates...")
36-
commitChangelogAndPackageVersionUpdates(config)
35+
print("\nStep 4: Creating PR with needed changes to default branch...")
36+
createPrAfterRelease(config)
3737

3838
except Exception as e:
3939
print("\n--- ERROR: Netcode release process failed ---", file=sys.stderr)

0 commit comments

Comments
 (0)