Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dat 15505 #69

Merged
merged 18 commits into from
Sep 15, 2023
Merged

Dat 15505 #69

merged 18 commits into from
Sep 15, 2023

Conversation

jandroav
Copy link
Contributor

No description provided.

jandroav added 18 commits September 15, 2023 11:01
… to Sonatype Maven Central Repository

This commit adds a new workflow file `pom-release-published.yml` that is triggered when a workflow call event occurs. The workflow is triggered by the caller workflow and requires the `SONATYPE_USERNAME` and `SONATYPE_TOKEN` secrets to be provided.

The `release` job in the workflow runs on the `ubuntu-latest` environment and performs the following steps:
1. Checks out the repository using `actions/checkout@v3`.
2. Sets up Java for publishing to the Maven Central Repository using `actions/setup-java@v3`. The Java version is set to `17` and the distribution is set to `temurin`. The Maven cache is also configured.
3. Configures Git with the username and email.
4. Builds the release artifacts using Maven. The `release:clean` and `release:prepare` goals are executed with the necessary arguments. The release version is obtained from the `liquibaseVersion` input provided by the caller workflow. The changes are not pushed to the remote repository.
5. Retrieves the artifact ID from the Maven project and sets it as an environment variable.
6. Downloads the release artifacts using `robinraju/release-downloader@v1.6`. The artifacts are downloaded based on the tag name and the artifact ID.
7. Publishes the artifacts to the Maven Central Repository using the `maven-deploy-plugin`. The Maven username and password are obtained from the `SONATYPE_USERNAME` and `SONATYPE_TOKEN` secrets respectively. The POM file and its associated files are deployed to the Sonatype Nexus staging repository.

The `maven-release` job is dependent on the `release` job and uses the `liquibase/build-logic/.github/workflows/extension-release-prepare.yml@v0.4.2` action. The secrets are inherited from the `release` job.

No newline at end of file.
… table

The `pom-release-published.yml` workflow is responsible for publishing a release pom to Maven Central. This workflow is added to the table of reusable workflows in the README.md file to provide visibility and documentation for this new workflow.
…railing whitespace for better readability

chore(pom-release-published.yml): remove unused parameters in maven-release step to simplify the command
…ons to maven deploy command

The maven deploy command was missing the file and classifiers options, which caused the pom.asc file to not be deployed. This commit adds the missing options to ensure that the pom.asc file is included in the deployment.
… deploy command

The options `-Dfiles`, `-Dtypes`, and `-Dclassifiers` were removed from the maven deploy command as they were not needed.
…n deploy command to include the .asc file for GPG signature

feat(pom-release-published.yml): add a new job 'maven-release' that depends on the 'release' job
… deploy command

The options `-Dfiles=${{ env.artifact_id }}-${version}.pom.asc`, `-Dtypes=asc`, and `-Dclassifiers=asc` were removed from the maven deploy command as they are unnecessary and do not affect the deployment process.
… Maven release command to include it in the release artifacts
…ease step to include pom.asc file in the release artifacts
…m the Maven command to fix an issue with releasing the POM file
…meter to include the file extension

fix(pom-release-published.yml): add the pom.asc classifier to the -Dclassifiers parameter to include the asc file in the deployment
…meter to include the .pom extension

fix(pom-release-published.yml): fix the -Dclassifiers parameter value to be 'asc' instead of 'pom.asc'
…n maven-release step

The classifier value in the maven-release step was set to a comma (,) which is unnecessary. This commit removes the classifier value to improve the clarity and correctness of the workflow.
…ine 58 to properly escape the line continuation

fix(pom-release-published.yml): fix missing comma in line 62 to separate classifiers
… the line to properly continue the command on the next line
…generating pom.asc file during release

The configuration for generating the pom.asc file was removed as it is not needed for the release process.
…om deploy-file to deploy to match the correct plugin goal
…reflect its purpose

feat(pom-release-published.yml): add support for deploying additional files (sources, javadoc, and signatures) to Sonatype repository for better artifact management
@jandroav jandroav merged commit 0b4e70e into main Sep 15, 2023
@jandroav jandroav deleted the DAT-15505 branch September 15, 2023 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant