Skip to content

Publish from any s3-li-X.Y.Z release branch - #17

Open
crliao wants to merge 1 commit into
s3-li-2.23.3from
crliao/generic-s3-li-release-branches
Open

crliao wants to merge 1 commit into
s3-li-2.23.3from
crliao/generic-s3-li-release-branches

Conversation

@crliao

@crliao crliao commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Motivation and Context

The publish workflow and release check hardcode a single release branch (s3-li-2.23.3). Every new release line, such as s3-li-2.59.1 in #16, needs about 10 string edits across the workflow, script, tests and docs. This change makes the tooling work on any s3-li-X.Y.Z branch, so the same files can be carried to each release line unchanged.

Modifications

  • publish-linkedin.yml: the push trigger is s3-li-*, and the job guards use startsWith(github.ref, 'refs/heads/s3-li-'). Everything else is unchanged.
  • check-linkedin-release.py enforces the stricter rules the glob can't express:
    • Only refs/heads/s3-li-X.Y.Z is a release branch. Names like s3-li-2.59.1-test, s3-li-2.59 or tags never publish.
    • A push publishes only if its merged PR targeted that same branch.
    • The published version must be X.Y.Z-li-A.B for the branch's own X.Y.Z. s3-li-2.59.1 can't publish a 2.23.3-li-* version.
    • --prepare fails if it doesn't run on a release branch.
    • The local RELEASE_VERSION=... check-linkedin-release.py check still works without GITHUB_REF.
  • docs/LinkedInPublishing.md describes the generic branch rules. The jfrog-publish environment keeps an explicit branch list, not a wildcard, so each new release line still needs an admin to allow it before anything uploads.

Testing

  • cd .github/scripts && python3 -m unittest test_check_linkedin_release: OK. New tests cover branch-name parsing, cross-branch PRs, branch/version mismatch before any network call, and --prepare on non-release branches.
  • actionlint .github/workflows/publish-linkedin.yml: no new findings. It reports only the concurrency.queue key, which already exists on the base branch and is newer than this actionlint version.
  • Not run: the workflow itself on GitHub. Merging this into s3-li-2.23.3 triggers a publish run that stops at the already-published check for 2.23.3-li-0.6 and uploads nothing.

Screenshots (if appropriate)

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

Replace the hardcoded s3-li-2.23.3 branch in the publish workflow and
release check with an s3-li-* trigger. The check accepts only
refs/heads/s3-li-X.Y.Z, requires the merged PR base to be that branch,
and requires the published version to be X.Y.Z-li-A.B for the same
upstream X.Y.Z.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@crliao
crliao marked this pull request as ready for review December 3, 2026 23:48
@satishkotha

Copy link
Copy Markdown
Collaborator

this is only merging into
s3-li-2.23.3 branch. do you also want to merge into other li branches?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants