Skip to content

Add cmp-change-version action - #2

Open
ninovanhooff wants to merge 2 commits into
mainfrom
cmp-app-version-code
Open

ninovanhooff wants to merge 2 commits into
mainfrom
cmp-app-version-code

Conversation

@ninovanhooff

@ninovanhooff ninovanhooff commented Nov 24, 2026 •

Copy link
Copy Markdown

Summary

Adds a cmp-change-version action that overrides the version code, and optionally the version name, of a Compose Multiplatform app. It's extracted from prepare-release in Q42/Template.ComposeMultiplatform#284, following the review suggestion to share it across projects instead of copying it into every repo.

  • By default, the version code is github.run_number + version-code-offset. You can also pass an explicit version-code.
  • The action sets ORG_GRADLE_PROJECT_<property> through GITHUB_ENV. Gradle reads these as project properties, which take precedence over gradle.properties. So every later Gradle call in the job gets the same value without changing tracked files, including embedAndSignAppleFrameworkForXcode started by Xcode.
  • The property names are configurable and default to appVersionCode and appVersionName.
  • Inputs are passed through env: instead of being inserted straight into the script, and the version code and offset must be whole numbers.
  • The resolved version code is exposed as the version-code output.

Also adds .gitignore rules for machine-specific JetBrains IDE files.

Testing

I extracted the shell script and ran it locally with the default, an offset plus a version name, an explicit version code, and an invalid offset. All four behaved as expected.

After merging

This only adds things, so it's a minor release. Q42/Template.ComposeMultiplatform#284 references @v1, so it depends on step 3.

  1. Tag the merge commit as v1.1.0:
    git fetch origin && git tag v1.1.0 origin/main && git push origin v1.1.0
    
  2. Create a GitHub release for v1.1.0. Changes since v1.0.0:
    • New: cmp-change-version action
    • New: upload-symbols-to-firebase action, which now supports a custom source packages path
    • Updated: install-certificate action
  3. Move the v1 major tag to the same commit:
    git tag -f v1 v1.1.0 && git push -f origin v1
    

🤖 Generated with Claude Code

ninovanhooff and others added 2 commits November 24, 2026 10:42
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Overrides the version code (and optionally version name) of a Compose
Multiplatform app for all later Gradle calls in the job, including those
started by Xcode, by setting ORG_GRADLE_PROJECT_* environment variables.
The version code defaults to the workflow run number plus an offset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ninovanhooff ninovanhooff self-assigned this Nov 24, 2026
ninovanhooff added a commit to Q42/Template.ComposeMultiplatform that referenced this pull request Nov 24, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@mbernson mbernson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The action itself looks good to me. 👍🏼

I don't use a JetBrains IDE myself, so I'd prefer to leave the .idea folder out of this repo and keep things editor-agnostic.

@mbernson

Copy link
Copy Markdown
Member

The plan for after merging also looks good. You are already a collaborator on this repo, so go ahead!

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