Skip to content

Commit cdafa1d

Browse files
committed
Fix README.md according the latest state of code
1 parent 5bafe6d commit cdafa1d

File tree

1 file changed

+11
-66
lines changed

1 file changed

+11
-66
lines changed

README.md

Lines changed: 11 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ https://github.com/spring-io/spring-github-workflows/blob/78b29123a17655f019d800
5151
#### Maven SNAPSHOT caller workflow:
5252
https://github.com/spring-io/spring-github-workflows/blob/78b29123a17655f019d800690cc906d692f836a9/samples/ci-snapshot-maven.yml#L1-L13
5353

54-
The Gradle SNAPSHOT build workflow requires `ARTIFACTORY_USERNAME` & `ARTIFACTORY_PASSWORD` secretes to authorise JFrog Artifactory plugin; the Maven one uses JFrog CLI action and requires a `JF_ARTIFACTORY_SPRING` instead.
54+
Both Gradle and Maven SNAPSHOT build workflow requires `ARTIFACTORY_USERNAME` & `ARTIFACTORY_PASSWORD` secretes to authorise [spring-io/artifactory-deploy-action](https://github.com/spring-io/artifactory-deploy-action).
55+
Optionally, all the artifacts can be signed if `GPG_PASSPHRASE` and `GPG_PRIVATE_KEY` secrets are provided.
5556

5657
## Release Workflow
5758

@@ -87,47 +88,8 @@ The `buildToolArgs` parameter for this job means extra build tool arguments.
8788
For example, the mentioned `dist` value is a Gradle task in the project.
8889
Can be any Maven goal or other command line arguments.
8990

90-
The signing released artifacts before pushing to the repository is done now by build tool.
91-
The Gradle workflow is enhanced with specific init script to apply a `signing` plugin.
92-
There is no way to inject any goals for Maven build, so the POM file of the project must have the `maven-gpg-plugin` configuration with this profile:
93-
94-
````xml
95-
<profile>
96-
<id>sign</id>
97-
<activation>
98-
<property>
99-
<name>gpg.passphrase</name>
100-
</property>
101-
</activation>
102-
<build>
103-
<plugins>
104-
<plugin>
105-
<groupId>org.apache.maven.plugins</groupId>
106-
<artifactId>maven-gpg-plugin</artifactId>
107-
<version>3.0.1</version>
108-
<executions>
109-
<execution>
110-
<id>sign-artifacts</id>
111-
<phase>verify</phase>
112-
<goals>
113-
<goal>sign</goal>
114-
</goals>
115-
<configuration>
116-
<gpgArguments>
117-
<arg>--pinentry-mode</arg>
118-
<arg>loopback</arg>
119-
<arg>--no-tty</arg>
120-
</gpgArguments>
121-
</configuration>
122-
</execution>
123-
</executions>
124-
</plugin>
125-
</plugins>
126-
</build>
127-
</profile>
128-
````
129-
130-
The Maven release workflow uses `crazy-max/ghaction-import-gpg` to export `gpg_private_key` and `passphrase` based on respective secrets.
91+
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.
92+
In the end all the artifacts, together with their signatures, are uploaded to the Artifactory according to the respective workflow inputs.
13193

13294
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.
13395
Such a release workflow can also be scheduled (`cron`, fo example) against branches matrix.
@@ -207,32 +169,15 @@ jobs:
207169
```
208170
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.
209171

210-
## Gradle Init Scripts
172+
## "Dispatch Workflow and Wait" Action
211173

212-
The `next-dev-version-init.gradle` script adds a `nextDevelopmentVersion` task which is used when release has been staged and job is ready to push `Next development version` commit.
213-
The `spring-artifactory-init.gradle` script adds the `org.jfrog.gradle.plugin.artifactory.ArtifactoryPlugin` and `signing` plugins.
214-
Configures them for those projects where the `maven-publish` plugin is applied.
215-
The `signing` is activated if no `OSSRH_STAGING_PROFILE_NAME` environment variable is present, but `GPG_PASSPHRASE` & `GPG_PRIVATE_KEY` are present.
216-
The Artifactory plugin requires these environment variables:
174+
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.
175+
This action is used in the `verify-staged` job of the release workflow.
217176

218-
```
219-
ARTIFACTORY_URL
220-
ARTIFACTORY_REPOSITORY
221-
ARTIFACTORY_USERNAME
222-
ARTIFACTORY_PASSWORD
223-
ARTIFACTORY_BUILD_PROJECT
224-
ARTIFACTORY_BUILD_NAME
225-
ARTIFACTORY_BUILD_NUMBER
226-
ARTIFACTORY_BUILD_URL
227-
ARTIFACTORY_USER_AGENT_NAME
228-
ARTIFACTORY_USER_AGENT_VERSION
229-
ARTIFACTORY_VCS_REVISION
230-
ARTIFACTORY_VCS_URL
231-
```
177+
## Gradle Init Scripts
232178

233-
See more information about these properties in the JFrog [documentation](https://github.com/jfrog/build-info-go/blob/main/buildinfo-schema.json).
234-
See also [spring-artifactory-gradle-build/action.yml](.github/actions/spring-artifactory-gradle-build/action.yml) how those environment variables are calculated.
235-
The `artifactoryPublish` & `signing` tasks deal with `publishing.publications.mavenJava`.
236-
The `artifactoryPublish` also adds `zip.*` properties into `zip` artifacts.
179+
The `[deployment-repository-init.gradle](utils/deployment-repository-init.gradle)` script adds a Maven repository for publishing artifacts into a local directory (`/deployment-repository`) via respective `publishAllPublicationsToDeploymentRepository` Gradle task.
180+
Then [spring-io/artifactory-deploy-action](https://github.com/spring-io/artifactory-deploy-action) picks up those artifacts for uploading to the Artifactory.
181+
The Maven build does that via `deploy` goal and respective `-DaltDeploymentRepository=local::file:deployment-repository` CLI option.
237182

238183
See more information in the [Reusing Workflows](https://docs.github.com/en/actions/using-workflows/reusing-workflows).

0 commit comments

Comments
 (0)