You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SONARIAC-2094 Add "Publish New Release" Github Action (#7)
* add 'Publish Github Release' action
* add jira_release_name to create-jira-release-ticket action
* use correct env var for gh cli token
* fix input typo
* update gh cli step
* checkout repo as first step
* add readme
* fix formatting of python script
* use release SHA hash for checkout action
* use correct references to the github actions in the examples
* add check for release workflow
* drop draft check from new step for testing
* hardcode version check for testing
* hardcode failing release for testing
* test the failing run pt2
* update README
* update description in README
* update repo readme
Copy file name to clipboardExpand all lines: README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@ A centralized collection of reusable GitHub Actions designed to streamline and a
5
5
## Available Actions
6
6
7
7
*[**Create Jira Release Ticket**](create-jira-release-ticket/README.md): Automates the creation of an "Ask for release" ticket in Jira.
8
-
*[**Check Releasability Status**](check-releasability-status/README.md): Checks the releasability status of the master branch and extracts the version if successful.
8
+
*[**Check Releasability Status**](check-releasability-status/README.md): Checks the releasability status and extracts the version if successful.
9
9
*[**Update Release ticket Status**](update-release-ticket-status/README.md): Updates the status of a Jira release ticket and can change its assignee.
10
+
*[**Publish GitHub Release**](publish-github-release/README.md): Publishes a GitHub Release with notes fetched from Jira or provided directly.
10
11
*[**Release Jira Version**](release-jira-version/README.md): Releases a Jira version and creates the next one.
Copy file name to clipboardExpand all lines: create-jira-release-ticket/README.md
+25-22Lines changed: 25 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,34 +5,35 @@ This GitHub Action automates the creation of an "Ask for release" ticket in Jira
5
5
The action is self-contained and uses a Python script to interact with the Jira API.
6
6
## Prerequisites
7
7
8
-
The action requires that the repository needs to have the `development/kv/data/jira` token configured in vault.
8
+
The action requires that the repository has the `development/kv/data/jira` token configured in vault.
9
9
This can be done using the SPEED self-service portal ([more info](https://xtranet-sonarsource.atlassian.net/wiki/spaces/Platform/pages/3553787989/Manage+Vault+Policy+-+SPEED)).
10
10
11
11
## Inputs
12
12
13
13
The following inputs can be configured for the action:
|`jira_user`| The Jira user (email) for authentication. |`true`||
18
-
|`jira_token`| The Jira API token for authentication. |`true`||
19
-
|`project_key`| The project key (e.g., `SONARIAC`). |`true`||
20
-
|`project_name`| The display name of the project (e.g., `SonarIaC`). Will be used as the prefix of the resulting release ticket. |`true`||
21
-
|`version`| The new version string being released (e.g., `1.2.3`). |`true`||
22
-
|`short_description`| A brief description of the release. |`true`||
23
-
|`sq_compatibility`| The SonarQube compatibility version (e.g., `2025.3`). |`true`||
24
-
|`targeted_product`| The targeted product version (e.g., `11.0`). |`false`||
25
-
|`use_sandbox`| Set to `false` to use the Jira production server. |`false`|`true`|
26
-
|`documentation_status`| The status of the release documentation. |`false`|`N/A`|
27
-
|`rule_props_changed`| Whether rule properties have changed (`Yes` or `No`). |`false`|`No`|
28
-
|`jira_release_name`| The specific Jira release version to use. If omitted and there is only one unreleased version it will released it. |`false`|`''`|
29
-
|`sonarlint_changelog`| The SonarLint changelog content. |`false`|`''`|
This GitHub Action automates the creation of a GitHub Release. It can generate release notes by fetching the details directly from a Jira release version, or it can use release notes provided directly as an input.
4
+
If not publishing a draft release, the action will wait for the release workflow to complete before reporting its status.
5
+
6
+
This action uses the GitHub CLI to create the release and a Python script to interact with the Jira API.
7
+
8
+
## Prerequisites
9
+
10
+
To fetch release notes from Jira, the action requires that the repository has the `development/kv/data/jira` token configured in vault.
11
+
This can be done using the SPEED self-service portal ([more info](https://xtranet-sonarsource.atlassian.net/wiki/spaces/Platform/pages/3553787989/Manage+Vault+Policy+-+SPEED)).
12
+
13
+
The action also requires a `github_token` with `contents: write` permissions to create the release. The default `${{ github.token }}` is usually sufficient.
14
+
15
+
## Inputs
16
+
17
+
The following inputs can be configured for the action:
|`github_token`| The GitHub token for API calls. |`true`|`${{ github.token }}`|
22
+
|`version`| The version number for the new release (e.g., `v1.0.0`). This will also be the tag name. |`true`||
23
+
|`branch`| The branch, commit, or tag to create the release from. |`false`|`master`|
24
+
|`draft`| A boolean value to indicate if the release should be a draft. |`false`|`true`|
25
+
|`release_notes`| The full markdown content for the release notes. If provided, this is used directly, ignoring Jira inputs. |`false`|`''`|
26
+
|`jira_release_name`| The name of the Jira release version. If provided and `release_notes` is empty, notes will be fetched from Jira. |`false`|`''`|
27
+
|`jira_project_key`| The Jira project key (e.g., "SONARPHP") to fetch notes from. Required if using `jira_release_name`. |`false`||
28
+
|`jira_user`| Jira user (email) for authentication. Required if using `jira_release_name`. |`false`||
29
+
|`jira_token`| Jira API token for authentication. Required if using `jira_release_name`. |`false`||
30
+
|`issue_types`| Optional comma-separated list of Jira issue types to include in the release notes, in order of appearance. |`false`|`''`|
31
+
|`use_sandbox`| Set to `false` to use the Jira production server instead of the sandbox. |`false`|`true`|
32
+
|`wait_for_workflow_name`| The name or file name of the workflow to wait for upon a non-draft release. If empty, this step is skipped. |`false`|`sonar-release`|
|`release_url`| The URL of the newly created release. |
39
+
40
+
## Example Usage
41
+
42
+
Here is an example of how to use this action in a workflow. This job can be triggered manually to publish a new release, with release notes generated from a specified Jira version.
43
+
44
+
```yaml
45
+
name: Publish New Release
46
+
47
+
on:
48
+
workflow_dispatch:
49
+
inputs:
50
+
version:
51
+
description: 'The version to release (e.g., v1.2.3)'
52
+
required: true
53
+
jira_release_name:
54
+
description: 'The corresponding release name in Jira'
0 commit comments