-
Notifications
You must be signed in to change notification settings - Fork 128
75 lines (70 loc) · 2.79 KB
/
Copy pathfull-release.yml
File metadata and controls
75 lines (70 loc) · 2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Full release
on:
workflow_dispatch:
inputs:
short-description:
description: 'A short description for the release ticket'
required: true
type: string
branch:
description: 'The branch from which to release.'
required: false
default: 'master'
type: string
new-version:
description: 'New Jira version to create after the release (e.g. 10.9). Leave empty to auto-increment the last segment.'
required: false
type: string
dry-run:
description: 'Test mode: use Jira sandbox and create a draft GitHub release'
required: false
default: false
type: boolean
jobs:
release:
name: Release
uses: SonarSource/release-github-actions/.github/workflows/ide-automated-release.yml@706e44289960d7768dc6f953bc1c0df003e812cb # 1.5.9
permissions:
statuses: read
id-token: write
contents: write
actions: write
pull-requests: write
with:
jira-project-key: "SLE"
project-name: "SonarLint for Eclipse"
short-description: ${{ inputs.short-description }}
branch: ${{ inputs.branch }}
slack-channel: "C06M11XJHCN" #squad-ide-eclipse-bots
is-test-run: ${{ inputs.dry-run }}
new-version: ${{ inputs.new-version }}
bump-version:
name: Bump Tycho version
needs: [release]
# Dry-run safety: never open a Tycho version-bump PR against master during a sandbox test
if: ${{ !inputs.dry-run && needs.release.result == 'success' }}
runs-on: github-ubuntu-latest-s
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
ref: ${{ inputs.branch }}
- name: Bump Tycho version
env:
NEW_VERSION: ${{ needs.release.outputs.new-version }}
run: |
NV="$NEW_VERSION"
# new-version is the Jira short version (X.Y for minor, X.Y.Z for patch — never 4-segment).
# Tycho requires 3-segment OSGi format: pad X.Y to X.Y.0; X.Y.Z passes through unchanged.
if [[ "$NV" =~ ^[0-9]+\.[0-9]+$ ]]; then NV="${NV}.0"; fi
mvn -B org.eclipse.tycho:tycho-versions-plugin:set-version \
-Dtycho.mode=maven -DnewVersion="${NV}-SNAPSHOT"
- uses: SonarSource/release-github-actions/create-pull-request@706e44289960d7768dc6f953bc1c0df003e812cb # 1.5.9
with:
commit-message: Prepare next development iteration ${{ needs.release.outputs.new-version }}
title: Prepare next development iteration ${{ needs.release.outputs.new-version }}
branch: bot/prepare-next-development-iteration-${{ needs.release.outputs.new-version }}
base: ${{ inputs.branch }}
reviewers: ${{ github.actor }}