Last active
December 21, 2021 09:24
-
-
Save ruseel/e7bebdfd8f87adb140fbbe9a7f559ea6 to your computer and use it in GitHub Desktop.
varticle/bazel-distribution deploy_maven example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load('@vaticle_bazel_distribution//maven:rules.bzl', "assemble_maven", "deploy_maven") | |
java_library( | |
name = "some_lib", | |
resources = glob(["src/test/resources/**/*"]), | |
tags = ["maven_coordinates=group_id:artifact:{pom_version}"], | |
) | |
assemble_maven( | |
name = "assemble", | |
target="some_lib", | |
version_file = ":version.txt", | |
workspace_refs = ":workspace_refs.json", | |
) | |
# can be used with `github maven packages` | |
# env var 'DEPLOY_MAVEN_USERNAME', 'DEPLOY_MAVEN_PASSWORD' is needed. | |
# | |
# bazel run //:deploy (release|snapshot) | |
deploy_maven( | |
name = "deploy", | |
target = ":assemble", | |
release = "https://maven.pkg.github.com/organization_id/project_id", | |
snapshot = "https://maven.pkg.github.com/organization_id/project_id", | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment