This GitHub Action automates releasing a version in Jira.
The action performs the following operations:
- Connecting to Jira using authentication credentials from Vault
- Validating required project key from inputs or environment variables
- Finding a Jira version matching the
jira-version-nameinput within the specifiedjira-project-key - Marking that version as "released" in Jira, setting the release date to the current day
This action depends on:
- SonarSource/vault-action-wrapper for retrieving Jira credentials
- SonarSource/release-github-actions/get-jira-version when auto-determining version names
| Input | Description | Required | Default |
|---|---|---|---|
jira-project-key |
The key of the Jira project (e.g., SONARIAC). Can also be set via JIRA_PROJECT_KEY environment variable |
No* | - |
jira-version-name |
The name of the Jira version to release (e.g., 1.2.3). Can also be set via JIRA_VERSION_NAME environment variable. If not provided, the script will determine the next version based on the release version. |
No | Auto-determined |
use-jira-sandbox |
Use the sandbox server instead of the production Jira. Can also be controlled via USE_JIRA_SANDBOX environment variable |
No | - |
*Either the input or corresponding environment variable must be provided for jira-project-key.
No outputs are defined for this action, as it primarily performs operations without returning values.
- name: Release Jira Version
uses: SonarSource/release-github-actions/release-jira-version@v1
with:
jira-project-key: 'SONARIAC'
jira-version-name: '1.2.3'- name: Release Current Jira Version
uses: SonarSource/release-github-actions/release-jira-version@v1
with:
jira-project-key: 'SONARIAC'
# jira-version-name is omitted - will auto-determine from the release version- name: Release Jira Version
uses: SonarSource/release-github-actions/release-jira-version@v1
env:
JIRA_PROJECT_KEY: 'SONARIAC'
JIRA_VERSION_NAME: '1.2.3'- name: Release Jira Version in Sandbox
uses: SonarSource/release-github-actions/release-jira-version@v1
with:
jira-project-key: 'SONARIAC'
jira-version-name: '1.2.3'
use-jira-sandbox: 'true'The action uses a Python script that:
- Authenticates with Jira using credentials from HashiCorp Vault
- Validates required project key from inputs or environment variables
- Supports both production and sandbox Jira environments via URL selection
- Can auto-determine which version to release by finding the latest unreleased version
- Releases the specified version using the Jira REST API
The action requires that the repository has the development/kv/data/jira token configured in vault.
This can be done using the SPEED self-service portal (more info).
The Jira API user must have the project role Administrators for the target project to manage releases.
- This action requires access to SonarSource's HashiCorp Vault for Jira credentials
- Either
jira-project-keyinput orJIRA_PROJECT_KEYenvironment variable must be provided - Input parameters take precedence over environment variables when both are provided
- The action supports both production and sandbox Jira environments
- Version names should follow semantic versioning patterns for best results
- The released version will be marked with the current date as the release date