This is an automated email from the ASF dual-hosted git repository.
chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fory.git
The following commit(s) were added to refs/heads/main by this push:
new 42a91e1aa fix(ci): fix pypa/gh-action-pypi-publish (#3764)
42a91e1aa is described below
commit 42a91e1aae20b18ca3e3233c359f06b1ab8af512
Author: Shawn Yang <[email protected]>
AuthorDate: Sat Jun 13 18:57:59 2026 +0800
fix(ci): fix pypa/gh-action-pypi-publish (#3764)
## Why?
## What does this PR do?
## Related issues
## AI Contribution Checklist
- [ ] Substantial AI assistance was used in this PR: `yes` / `no`
- [ ] If `yes`, I included a completed [AI Contribution
Checklist](https://github.com/apache/fory/blob/main/AI_POLICY.md#9-contributor-checklist-for-ai-assisted-prs)
in this PR description and the required `AI Usage Disclosure`.
- [ ] If `yes`, my PR description includes the required `ai_review`
summary and screenshot evidence of the final clean AI review results
from both fresh reviewers on the current PR diff or current HEAD after
the latest code changes.
## Does this PR introduce any user-facing change?
- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?
## Benchmark
---
.github/workflows/ci.yml | 12 ++++++--
.github/workflows/release-compiler.yaml | 2 +-
.github/workflows/release-python.yaml | 2 +-
ci/release.py | 33 ++++++++++++++++++++++
ci/run_ci.sh | 4 +--
.../idl_tests/scala/project/build.properties | 2 +-
scala/build.sbt | 9 ++++--
scala/project/build.properties | 2 +-
8 files changed, 55 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2d1da52a1..3695560c3 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -594,6 +594,8 @@ jobs:
needs: changes
if: needs.changes.outputs.scala == 'true'
runs-on: ubuntu-latest
+ env:
+ FORY_SCALA_MAVEN_LOCAL: /tmp/fory-scala-m2/repository
steps:
- uses: actions/checkout@v5
- name: Set up JDK11
@@ -611,7 +613,7 @@ jobs:
${{ runner.os }}-maven-
- uses: sbt/setup-sbt@2e222825582620cc38d2a54e674f3c01b7c14f5d # v1.1.24
- name: Install fory java
- run: cd java && mvn -T10 --no-transfer-progress clean install
-DskipTests -Dmaven.javadoc.skip=true -Dmaven.source.skip=true && cd -
+ run: cd java && mvn -T10 --no-transfer-progress clean install
-DskipTests -Dmaven.javadoc.skip=true -Dmaven.source.skip=true
-Dmaven.repo.local="$FORY_SCALA_MAVEN_LOCAL" && cd -
- name: Test
run: |
cd scala && sbt +test && cd -
@@ -619,6 +621,8 @@ jobs:
scala_xlang:
name: Scala Xlang Test
runs-on: ubuntu-latest
+ env:
+ FORY_SCALA_MAVEN_LOCAL: /tmp/fory-scala-m2/repository
steps:
- uses: actions/checkout@v5
- name: Set up JDK 21
@@ -645,13 +649,15 @@ jobs:
ENABLE_FORY_DEBUG_OUTPUT: "1"
run: |
cd java
- mvn -T16 --no-transfer-progress clean install -DskipTests
-Dmaven.javadoc.skip=true -Dmaven.source.skip=true
+ mvn -T16 --no-transfer-progress clean install -DskipTests
-Dmaven.javadoc.skip=true -Dmaven.source.skip=true
-Dmaven.repo.local="$FORY_SCALA_MAVEN_LOCAL"
cd fory-core
mvn -T16 --no-transfer-progress test
-Dtest=org.apache.fory.xlang.ScalaXlangTest
scala_idl:
name: Scala IDL Tests
runs-on: ubuntu-latest
+ env:
+ FORY_SCALA_MAVEN_LOCAL: /tmp/fory-scala-m2/repository
steps:
- uses: actions/checkout@v5
- name: Set up JDK 21
@@ -675,7 +681,7 @@ jobs:
- name: Install Fory Java
run: |
cd java
- mvn -T16 --no-transfer-progress clean install -DskipTests
-Dmaven.javadoc.skip=true -Dmaven.source.skip=true
+ mvn -T16 --no-transfer-progress clean install -DskipTests
-Dmaven.javadoc.skip=true -Dmaven.source.skip=true
-Dmaven.repo.local="$FORY_SCALA_MAVEN_LOCAL"
- name: Run Scala IDL Tests
run: ./integration_tests/idl_tests/run_scala_tests.sh
diff --git a/.github/workflows/release-compiler.yaml
b/.github/workflows/release-compiler.yaml
index 66d55a846..d155c180a 100644
--- a/.github/workflows/release-compiler.yaml
+++ b/.github/workflows/release-compiler.yaml
@@ -55,7 +55,7 @@ jobs:
python -m build --sdist --wheel
- name: Publish to TestPyPI
- uses:
pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.14.0
+ uses:
pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.14.0
if: ${{ contains(github.ref_name, '-') }}
with:
repository-url: https://test.pypi.org/legacy/
diff --git a/.github/workflows/release-python.yaml
b/.github/workflows/release-python.yaml
index 7561989f9..f09ac43d2 100644
--- a/.github/workflows/release-python.yaml
+++ b/.github/workflows/release-python.yaml
@@ -52,7 +52,7 @@ jobs:
echo "head_branch: ${{ github.event.workflow_run.head_branch }}"
- name: Publish to TestPyPI
- uses:
pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.14.0
+ uses:
pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.14.0
if: startsWith(github.event.workflow_run.head_branch, 'v') &&
contains(github.event.workflow_run.head_branch, '-')
with:
repository-url: https://test.pypi.org/legacy/
diff --git a/ci/release.py b/ci/release.py
index 779d903a5..ac1f6966f 100644
--- a/ci/release.py
+++ b/ci/release.py
@@ -334,6 +334,9 @@ def bump_dart_version(new_version):
new_version,
_update_dart_readme_dependency_version,
)
+ if _is_release_version(new_version):
+ for p in ["dart", "dart/packages/fory"]:
+ _bump_version(p, "CHANGELOG.md", new_version,
_update_dart_changelog)
def bump_compiler_version(new_version):
@@ -587,6 +590,29 @@ def _update_dart_readme_dependency_version(lines, v: str):
raise ValueError("No Dart README dependency snippet for fory found")
+def _update_dart_changelog(lines, v: str):
+ v = v.strip()
+ if v.startswith("v"):
+ v = v[1:]
+ heading = f"## {v}\n"
+ body = ["\n", f"- Release Apache Fory Dart {v}.\n", "\n"]
+ heading_pattern = re.compile(rf"^##\s+{re.escape(v)}(?:-[^\s]+)?\s*$")
+ start_index = -1
+ for index, line in enumerate(lines):
+ if heading_pattern.match(line):
+ start_index = index
+ break
+ if start_index == -1:
+ return [heading] + body + lines
+
+ end_index = len(lines)
+ for index in range(start_index + 1, len(lines)):
+ if re.match(r"^##\s+", lines[index]):
+ end_index = index
+ break
+ return lines[:start_index] + [heading] + body + lines[end_index:]
+
+
def _update_csharp_props_version(lines, v: str):
for index, line in enumerate(lines):
if "<Version>" not in line:
@@ -701,6 +727,13 @@ def _normalize_js_version(v: str) -> str:
return v
+def _is_release_version(v: str) -> bool:
+ v = v.strip()
+ if v.startswith("v"):
+ v = v[1:]
+ return re.match(r"^\d+\.\d+\.\d+$", v) is not None
+
+
def _normalize_rust_version(v: str) -> str:
v = v.strip()
v = re.sub(r"-(alpha|beta|rc)(\d+)$", r"-\1.\2", v)
diff --git a/ci/run_ci.sh b/ci/run_ci.sh
index 316d5c30c..4081aecf2 100755
--- a/ci/run_ci.sh
+++ b/ci/run_ci.sh
@@ -155,7 +155,7 @@ install_jdk25_fory_artifacts() {
use_jdk "zulu25.30.17-ca-jdk25.0.1-linux_x64"
export JDK_JAVA_OPTIONS="$(jdk25_javac_options)"
cd "$ROOT"/java
- mvn -T10 -B --no-transfer-progress clean install -DskipTests -pl
'!:fory-testsuite'
+ mvn -T10 -B --no-transfer-progress clean install -DskipTests
echo "Verify JDK25 benchmark multi-release jar"
cd "$ROOT"/benchmarks/java
mvn -T10 -B --no-transfer-progress -Pjmh -DskipTests install
@@ -311,7 +311,7 @@ case $1 in
echo "Executing fory java tests"
cd "$ROOT/java"
set +e
- mvn -T16 --batch-mode --no-transfer-progress clean test
+ mvn -T16 --batch-mode --no-transfer-progress clean install
testcode=$?
if [[ $testcode -ne 0 ]]; then
exit $testcode
diff --git a/integration_tests/idl_tests/scala/project/build.properties
b/integration_tests/idl_tests/scala/project/build.properties
index c12725b41..d5ba1b9b7 100644
--- a/integration_tests/idl_tests/scala/project/build.properties
+++ b/integration_tests/idl_tests/scala/project/build.properties
@@ -15,4 +15,4 @@
# specific language governing permissions and limitations
# under the License.
-sbt.version=1.9.9
+sbt.version=1.12.11
diff --git a/scala/build.sbt b/scala/build.sbt
index f72df29be..baa8ab594 100644
--- a/scala/build.sbt
+++ b/scala/build.sbt
@@ -18,6 +18,8 @@
val foryVersion = "1.2.0-SNAPSHOT"
val scala213Version = "2.13.15"
+val foryMavenLocal =
+ sys.env.get("FORY_SCALA_MAVEN_LOCAL").map(file).getOrElse(Path.userHome /
".m2" / "repository")
ThisBuild / apacheSonatypeProjectProfile := "fory"
version := foryVersion
scalaVersion := scala213Version
@@ -38,8 +40,11 @@ lazy val root = Project(id = "fory-scala", base = file("."))
"[email protected]",
url("https://github.com/apache/fory/graphs/contributors"))))
-resolvers += Resolver.mavenLocal
-resolvers += Resolver.ApacheMavenSnapshotsRepo
+ThisBuild / externalResolvers := Seq(
+ Resolver.mavenCentral,
+ Resolver.ApacheMavenSnapshotsRepo,
+ Resolver.file("fory-maven-local",
foryMavenLocal)(Resolver.mavenStylePatterns),
+)
libraryDependencies ++= Seq(
"org.apache.fory" % "fory-core" % foryVersion,
diff --git a/scala/project/build.properties b/scala/project/build.properties
index c12725b41..d5ba1b9b7 100644
--- a/scala/project/build.properties
+++ b/scala/project/build.properties
@@ -15,4 +15,4 @@
# specific language governing permissions and limitations
# under the License.
-sbt.version=1.9.9
+sbt.version=1.12.11
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]