Skip to content

Commit 1bf335b

Browse files
SONARPHP-1677 add automate release workflow (#1426)
1 parent 0132186 commit 1bf335b

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Automate release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
project_key:
7+
description: 'Jira Project Key'
8+
required: true
9+
default: 'SONARIAC'
10+
project_name:
11+
description: 'Jira Project Name'
12+
required: true
13+
default: 'SonarIaC'
14+
new_version:
15+
description: 'New Version'
16+
required: true
17+
default: '1.0.0'
18+
short_description:
19+
description: 'Short Description'
20+
required: true
21+
default: 'My new release'
22+
targeted_product:
23+
description: 'Targeted Product'
24+
required: true
25+
default: '11.0'
26+
sq_compatibility:
27+
description: 'SonarQube Compatibility'
28+
required: true
29+
default: '2025.3'
30+
31+
jobs:
32+
create_release_ticket:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Get Jira Token
36+
id: secrets
37+
uses: SonarSource/vault-action-wrapper@3996073b47b49ac5c58c750d27ab4edf469401c8 # 3.0.1
38+
with:
39+
secrets: |
40+
development/kv/data/jira user | JIRA_USER;
41+
development/kv/data/jira token | JIRA_TOKEN;
42+
43+
- name: Checkout repository
44+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
45+
46+
- name: Create Jira Release Ticket
47+
id: create_ticket
48+
uses: SonarSource/release-github-actions/.github/actions/create-jira-release@SONARIAC-2092
49+
with:
50+
jira_user: ${{ fromJSON(steps.secrets.outputs.vault).JIRA_USER }}
51+
jira_token: {{ fromJSON(steps.secrets.outputs.vault).JIRA_TOKEN }}
52+
project_key: ${{ github.event.inputs.project_key }}
53+
project_name: ${{ github.event.inputs.project_name }}
54+
new_version: ${{ github.event.inputs.new_version }}
55+
short_description: ${{ github.event.inputs.short_description }}
56+
targeted_product: ${{ github.event.inputs.targeted_product }}
57+
sq_compatibility: ${{ github.event.inputs.sq_compatibility }}
58+
59+
- name: Echo Ticket Key
60+
run: echo "The created Jira ticket key is ${{ steps.create_ticket.outputs.ticket_key }}"

0 commit comments

Comments
 (0)