-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (102 loc) · 4.25 KB
/
gradle-release.yml
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Gradle initScript release
on:
workflow_dispatch:
inputs:
version:
type: string
required: true
permissions:
contents: write
pull-requests: write
jobs:
update-reference:
runs-on: ubuntu-latest
steps:
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GH_BOT_PGP_PRIVATE_KEY }}
passphrase: ${{ secrets.GH_BOT_PGP_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
git_config_global: true
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}
- name: Generate reference script with version
run: ./gradlew promote -Pversion=${{ inputs.version }}
- name: Commit & push changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_author: bot-githubaction <[email protected]>
commit_user_name: bot-githubaction
commit_user_email: [email protected]
commit_message: '[bot] Promote init-script as ${{ inputs.version }}'
tagging_message: '${{ inputs.version }}'
update-gradle-actions:
needs: [update-reference]
uses: ./.github/workflows/gradle-send-update-pr.yml
with:
version: ${{ inputs.version }}
repository: 'gradle/actions'
script-location: 'sources/src/resources/init-scripts/gradle-actions.inject-develocity.init.gradle'
secrets: inherit
update-develocity-gitlab-templates:
needs: [update-reference]
uses: ./.github/workflows/gradle-send-update-pr.yml
with:
version: ${{ inputs.version }}
repository: 'gradle/develocity-gitlab-templates'
script-location: 'src/gradle/init-scripts/develocity-injection.init.gradle'
post-process: './build.sh'
secrets: inherit
update-develocity-bamboo-plugin:
needs: [update-reference]
uses: ./.github/workflows/gradle-send-update-pr.yml
with:
version: ${{ inputs.version }}
repository: 'gradle/develocity-bamboo-plugin'
script-location: 'src/main/resources/develocity/gradle/develocity-init-script.gradle'
post-process: |
sed -i "s/def ENV_VAR_PREFIX = ''/def ENV_VAR_PREFIX = 'bamboo_'/" src/main/resources/develocity/gradle/develocity-init-script.gradle
secrets:
GH_BOT_GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} # bot-githubaction does not have write access
GH_BOT_PGP_PRIVATE_KEY: ${{ secrets.GH_BOT_PGP_PRIVATE_KEY }}
GH_BOT_PGP_PASSPHRASE: ${{ secrets.GH_BOT_PGP_PASSPHRASE }}
update-jenkins-gradle-plugin:
needs: [update-reference]
uses: ./.github/workflows/gradle-send-update-pr.yml
with:
version: ${{ inputs.version }}
repository: 'jenkinsci/gradle-plugin'
script-location: 'src/main/resources/hudson/plugins/gradle/injection/init-script.gradle'
secrets:
GH_BOT_GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} # bot-githubaction does not have write access
GH_BOT_PGP_PRIVATE_KEY: ${{ secrets.GH_BOT_PGP_PRIVATE_KEY }}
GH_BOT_PGP_PASSPHRASE: ${{ secrets.GH_BOT_PGP_PASSPHRASE }}
update-develocity-teamcity-plugin:
needs: [update-reference]
uses: ./.github/workflows/gradle-send-update-pr.yml
with:
version: ${{ inputs.version }}
repository: 'etiennestuder/teamcity-build-scan-plugin'
script-location: 'agent/src/main/resources/init-scripts/develocity-injection.init.gradle'
secrets:
GH_BOT_GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} # bot-githubaction does not have write access
GH_BOT_PGP_PRIVATE_KEY: ${{ secrets.GH_BOT_PGP_PRIVATE_KEY }}
GH_BOT_PGP_PASSPHRASE: ${{ secrets.GH_BOT_PGP_PASSPHRASE }}
update-develocity-build-validation-scripts:
needs: [update-reference]
uses: ./.github/workflows/gradle-send-update-pr.yml
with:
version: ${{ inputs.version }}
repository: 'gradle/gradle-enterprise-build-validation-scripts'
post-process: |
sed -i 's/com\.gradle:develocity-injection:[^"]*/com.gradle:develocity-injection:${{ inputs.version }}/' build.gradle.kts
secrets: inherit