You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a reusable spring-trigger-dependabot-updates.yml workflow
* Replace `[artifactory-release]` prefix in a commit message to the `[CI/CD]` for better generic context
* Fix `artifactoryPublish` Gradle task to the `publishAllPublicationsToDeploymentRepository`
in the `spring-artifactory-gradle-release.yml` `buildToolArgs` input description
* Fix typos in the `README.md`
* Mention `spring-trigger-dependabot-updates.yml` in the `README.md`
Copy file name to clipboardExpand all lines: .github/workflows/spring-artifactory-gradle-release.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ on:
4
4
workflow_call:
5
5
inputs:
6
6
buildToolArgs:
7
-
description: 'Additional Gradle command arguments: tasks, options etc. The `build` and `artifactoryPublish` for Gradle are included.'
7
+
description: 'Additional Gradle command arguments: tasks, options etc. The `build` and `publishAllPublicationsToDeploymentRepository` for Gradle are included.'
Copy file name to clipboardExpand all lines: README.md
+25-19Lines changed: 25 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,9 +27,9 @@ The `SPRING_RELEASE_CHAT_WEBHOOK_URL` secret is also optional: probably you don'
27
27
As well as `OSSRH_*` secret, since not all releases might go to Maven Central, e.g. private (commercial) repositories only.
28
28
Also, the `OSSRH_*` and `CENTRAL_TOKEN_*` secrets are mutually exclusive where `CENTRAL_TOKEN_*` will lead to publishing via [Maven Central Portal](https://central.sonatype.org/register/central-portal/).
29
29
30
-
The mentioned secrets must be passed explicitly since these reusable workflows might be in different GitHub org than target project.
30
+
The mentioned secrets must be passed explicitly since these reusable workflows might be in a different GitHub org than the target project.
31
31
32
-
The SNAPSHOT and Release workflows uses[spring-io/artifactory-deploy-action](https://github.com/spring-io/artifactory-deploy-action) to publish artifacts into Artifactory.
32
+
The SNAPSHOT and Release workflows use[spring-io/artifactory-deploy-action](https://github.com/spring-io/artifactory-deploy-action) to publish artifacts into Artifactory.
You can add more branches to react for pull request events.
46
+
You can add more branches to react to pull request events.
47
47
48
48
The SNAPSHOT workflows ([spring-artifactory-gradle-snapshot.yml](.github/workflows/spring-artifactory-gradle-snapshot.yml) and [spring-artifactory-maven-snapshot.yml](.github/workflows/spring-artifactory-maven-snapshot.yml), respectively) are also that simple.
49
49
They publish artifacts into `libs-snapshot-local` (by default) repository.
@@ -64,10 +64,10 @@ The [spring-artifactory-gradle-release.yml](.github/workflows/spring-artifactory
64
64
65
65
- The versioning schema must follow these rules: 3-digit-dotted number for `major`, `minor` and `patch` parts, snapshot is suffixed with `-SNAPSHOT`, milestones are with `-M{number}` and `-RC{number}` suffix, the GA release is without any suffix.
66
66
For example: `0.0.1-SNAPSHOT`, `1.0.0-M1`, `2.1.0-RC2`, `3.3.3`.
67
-
- GitHub Milestone titles must be exact as the version to release number.
67
+
- GitHub Milestone titles must be exact as the version-to-release number.
68
68
For example: `1.0.0-M1`, `2.1.0-RC2`, `3.3.3`.
69
69
- GitHub Milestones must be scheduled: have a `Due on` date set.
70
-
Otherwise, release workflow will be cancelled with a warning that nothing to release for respective SNAPSHOT in a branch.
70
+
Otherwise, the release workflow will be cancelled with a warning that nothing to release for the respective SNAPSHOT in a branch.
71
71
72
72
The logic of this release workflow:
73
73
@@ -80,25 +80,25 @@ This job stages released artifacts using JFrog Artifactory plugin into `libs-sta
80
80
- The next job is to [verify staged artifacts](#verify-staged-artifacts)
81
81
- When verification is successful, next job promotes release from staging either to `libs-milestone-local` or `libs-release-local` (by default) (and optional to Maven Central: if `bundleName` input is not provided) according to the releasing version schema
82
82
- Then [spring-finalize-release.yml](.github/workflows/spring-finalize-release.yml) job is executed, which tags release into GitHub, commits next development version, generates release notes using [Spring Changelog Generator](https://github.com/spring-io/github-changelog-generator) excluding repository admins from `Contributors` section.
83
-
The `gh release create` command is performed on a tag for just released version.
84
-
Then spring.io project page is updated for newly released version.
83
+
The `gh release create` command is performed on a tag for a just released version.
84
+
Then `spring.io` project page is updated for a newly released version.
85
85
(The [spring-website-project-version-update](.github/actions/spring-website-project-version-update) local action is implemented for this goal).
86
-
And in the end the milestone closed and specific Google Space notified about release (if `SPRING_RELEASE_CHAT_WEBHOOK_URL` secret is present in the repository).
86
+
And in the end the milestone closed, and specific Google Space notified about release (if `SPRING_RELEASE_CHAT_WEBHOOK_URL` secret is present in the repository).
Such a workflow must be on every branch which is supposed to be released via GitHub actions.
91
+
Such a workflow must be on every branch that is supposed to be released via GitHub actions.
92
92
93
93
The `buildToolArgs` parameter for this job means extra build tool arguments.
94
94
For example, the mentioned `dist` value is a Gradle task in the project.
95
95
Can be any Maven goal or other command line arguments.
96
96
97
97
The signing released artifacts is done by the [spring-io/artifactory-deploy-action](https://github.com/spring-io/artifactory-deploy-action) if `GPG_PASSPHRASE` and `GPG_PRIVATE_KEY` secrets are provided.
98
-
In the end all the artifacts, together with their signatures, are uploaded to the Artifactory according to the respective workflow inputs.
98
+
In the end, all the artifacts, together with their signatures, are uploaded to the Artifactory according to the respective workflow inputs.
99
99
100
-
In the end you just need to go to the `Actions` tab on your project, press `Run workflow` on your release workflow and choose a branch from drop-down list to release currently scheduled Milestone against.
101
-
Such a release workflow can also be scheduled (`cron`, fo example) against branches matrix.
100
+
In the end you just need to go to the `Actions` tab on your project, press `Run workflow` on your release workflow and choose a branch from a drop-down list to release currently scheduled Milestone against.
101
+
Such a release workflow can also be scheduled (`cron`, for example) against branches matrix.
The `verify-staged` job expects an optional `verifyStagedWorkflow` input (the `verify-staged-artifacts.yml`, by default) workflow supplied from the target project.
114
114
For example, [Spring Integration for AWS](https://github.com/spring-projects/spring-integration-aws) uses `jfrog rt download` command to verify that released `spring-integration-aws-${{ inputs.releaseVersion }}.jar` is valid.
115
-
Other projects may check out their samples repository and setup release version to perform smoke tests against just staged artifacts.
115
+
Other projects may check out their samples repository and set up release version to perform smoke tests against just staged artifacts.
If [Dependabot](https://github.com/dependabot) is enabled for repository, its config should set a label compatible with [Spring Changelog Generator](https://github.com/spring-io/github-changelog-generator).
130
+
If [Dependabot](https://github.com/dependabot) is enabled for the repository, its config should set a label compatible with [Spring Changelog Generator](https://github.com/spring-io/github-changelog-generator).
131
131
Typically, it is `type: dependency-upgrade`.
132
132
It is also a good practice to group all the development dependencies into a single pull request from Dependabot.
133
133
This includes all the Gradle and Maven plugins and those dependencies which are used only for testing in the project.
134
-
This projects provides a [spring-merge-dependabot-pr.yml](.github/workflows/spring-merge-dependabot-pr.yml) reusable workflow to make modifications to the Dependabot pull requests.
134
+
This project provides a [spring-merge-dependabot-pr.yml](.github/workflows/spring-merge-dependabot-pr.yml) reusable workflow to make modifications to the Dependabot pull requests.
135
135
However, there are some prerequisites to use this workflow in your project:
136
-
- Pull requests must be protected by some check to pass, usually a workflow to build the project with this pull request changes;
136
+
- Pull requests must be protected by some check to pass, usually a workflow to build the project with these pull request changes;
137
137
- The [auto-merge](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository) must be enabled in the repository (if `--auto` is used);
138
138
139
139
The `spring-merge-dependabot-pr` workflow does these modifications to the Dependabot pull requests:
140
140
- Modify label from `dependency-upgrade` to the `task` for the development dependencies group update to skip them from release notes by Spring Changelog Generator;
141
141
- Adds a currently scheduled milestone to the pull request against a snapshot version extracted from the target branch;
142
-
- And if milestone is scheduled, the pull request is queued for auto-merging after required checks have passed;
142
+
- And if a milestone is scheduled, the pull request is queued for auto-merging after required checks have passed;
143
143
- If `autoMergeSnapshots` input is set to `true`, the upgrade from Milestone/Release Candidate dependency to its SNAPSHOT is going to be merged automatically without assigning a milestone to the PR.
144
144
145
145
The `mergeArguments` input of this workflow is applied to the `gh pr merge` command.
The [spring-cherry-pick.yml](.github/workflows/spring-cherry-pick.yml) workflow offers a logic to cherry-pick pushed commit to branches suggested by the specific sentence in commit message.
152
+
The [spring-cherry-pick.yml](.github/workflows/spring-cherry-pick.yml) workflow offers a logic to cherry-pick pushed commit to branches suggested by the specific sentence in the commit message.
153
153
For example `Auto-cherry-pick to 6.2.x & 6.1.x`.
154
154
The `Auto-cherry-pick` token is a default value for the `autoCherryPickToken` input of this workflow.
155
155
The branches to cherry-pick to are extracted from the matching sentence.
@@ -175,6 +175,12 @@ jobs:
175
175
```
176
176
The workflow reacts to non-empty `due_on` property of the event's milestone payload and check if this property really was changed on milestone edit.
177
177
178
+
## Trigger Dependabot Updates
179
+
180
+
The [spring-trigger-dependabot-updates.yml](.github/workflows/spring-trigger-dependabot-updates.yml) workflow is a convenient alternative to the GitHub UI interface for Dependabot updates ($GH_REPOSITORY/network/updates).
181
+
The workflow performs toggle executable permission as a superficial change on the `dependabot.yml` file.
182
+
That is enough for Dependabot to understand that some changes have happened in the dependency updates config to trigger new versions check.
183
+
178
184
## "Dispatch Workflow and Wait" Action
179
185
180
186
The [spring-dispatch-workflow-and-wait](.github/actions/spring-dispatch-workflow-and-wait/action.yml) action implements the logic to call `gh workflow run` for the provided workflow file and wait until it is complete, successful or not.
0 commit comments