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