Skip to content

Migrate release workflow to gh-action_release v7#85

Merged
mostafa-mohammed-sonarsource merged 1 commit intomasterfrom
mj/update-release-action
May 6, 2026
Merged

Migrate release workflow to gh-action_release v7#85
mostafa-mohammed-sonarsource merged 1 commit intomasterfrom
mj/update-release-action

Conversation

@michael-jabbour-sonarsource
Copy link
Copy Markdown
Contributor

v6 is deprecated and replaced by v7 for immutable releases and tags.

Switch release triggering from the deprecated release:published event to manual workflow_dispatch with a required full version input, and pass that version to the reusable workflow.

Rationale: Release and Tag Immutability guidance

https://xtranet-sonarsource.atlassian.net/wiki/spaces/Platform/pages/5141594243/Release+and+Tag+Immutability+-+GitHub#gh-action_release-%E2%80%94-migrate-to-v7

v6 is deprecated and replaced by v7 for immutable releases and tags.

Switch release triggering from the deprecated release:published event to manual workflow_dispatch with a required full version input, and pass that version to the reusable workflow.

Rationale: Release and Tag Immutability guidance

https://xtranet-sonarsource.atlassian.net/wiki/spaces/Platform/pages/5141594243/Release+and+Tag+Immutability+-+GitHub#gh-action_release-%E2%80%94-migrate-to-v7
@michael-jabbour-sonarsource
Copy link
Copy Markdown
Contributor Author

This change is part of the following stack:

Change managed by git-spice.

@sonarqube-next
Copy link
Copy Markdown

sonarqube-next Bot commented May 5, 2026

@mostafa-mohammed-sonarsource mostafa-mohammed-sonarsource marked this pull request as ready for review May 6, 2026 06:44
@sonar-review-alpha
Copy link
Copy Markdown

sonar-review-alpha Bot commented May 6, 2026

Summary

This PR upgrades the release workflow from gh-action_release v6 to v7 and changes the trigger mechanism from automatic (on release:published) to manual (workflow_dispatch).

Key changes:

  • Trigger: Manual workflow_dispatch instead of automatic release:published event
  • Version input: Requires explicit full version (e.g., 1.25.1.3886) to be provided when triggering the workflow
  • Action version: Updates to v7 and passes the version parameter to the reusable workflow

This implements SonarSource's Release and Tag Immutability guidance to ensure better control over release artifacts and versioning.

What reviewers should know

What changed:
The .github/workflows/release.yml file has two main changes:

  1. Lines 1-9: Trigger mechanism and new required version input
  2. Line 16-18: Action version bump and version parameter passing

For reviewers:

  • The workflow is now manual rather than automatic — releases must be triggered explicitly via workflow_dispatch
  • When triggering, the caller must supply the version input with the full version string (build number included)
  • The v7 action receives this version explicitly, enabling the immutability guarantees
  • Config options (publishToBinaries: false, mavenCentralSync: true) remain unchanged
  • No changes to existing behavior beyond the trigger mechanism and version input

  • Generate Walkthrough
  • Generate Diagram

🗣️ Give feedback

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for taking care of this

@mostafa-mohammed-sonarsource mostafa-mohammed-sonarsource merged commit def49fc into master May 6, 2026
5 of 6 checks passed
@mostafa-mohammed-sonarsource mostafa-mohammed-sonarsource deleted the mj/update-release-action branch May 6, 2026 06:45
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