-
Notifications
You must be signed in to change notification settings - Fork 66
78 lines (73 loc) · 2.44 KB
/
Copy pathfull-release.yml
File metadata and controls
78 lines (73 loc) · 2.44 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
76
77
78
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
jobs:
lock-branch:
name: Lock ${{ inputs.branch }} branch
uses: ./.github/workflows/ToggleLockBranch.yml
permissions:
id-token: write
with:
branch: ${{ inputs.branch }}
release:
name: Release
uses: SonarSource/release-github-actions/.github/workflows/ide-automated-release.yml@v1
if: always() && !failure() && !cancelled()
permissions:
statuses: read
id-token: write
contents: write
actions: write
pull-requests: write
needs:
- lock-branch
with:
jira-project-key: "SLCORE"
project-name: "SonarLint Core"
short-description: ${{ inputs.short-description }}
branch: ${{ inputs.branch }}
unlock-branch:
name: Unlock ${{ inputs.branch }} branch
uses: ./.github/workflows/ToggleLockBranch.yml
needs: release
permissions:
id-token: write
with:
branch: ${{ inputs.branch }}
bump-version:
name: Create a PR to bump version
runs-on: github-ubuntu-latest-s
needs:
- release
permissions:
contents: write # write for peter-evans/create-pull-request, read for actions/checkout
pull-requests: write # write for peter-evans/create-pull-request
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: bump-version
env:
NEW_VERSION: ${{ needs.release.outputs.new-version }}
run: |
mvn versions:set -DgenerateBackupPoms=false -DnewVersion="$NEW_VERSION-SNAPSHOT"
- uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8
with:
author: ${{ github.actor }} <${{ github.actor }}>
commit-message: Prepare next development iteration
title: Prepare next development iteration
branch: bot/bump-project-version
branch-suffix: timestamp
delete-branch: true
base: master
draft: true # so that we don't actually need to re-open the PR and just make it ready for review
reviewers: ${{ github.actor }}
body: Bump the version for the new iteration. Created by release automation.