-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Chris Frantz <[email protected]>
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,45 @@ | ||
# bazel-release | ||
Bazel automated GitHub release process | ||
|
||
This repository contains bazel automation for performing releases to GitHub. | ||
|
||
## Usage | ||
|
||
Load this repository in your `WORKSPACE`: | ||
|
||
``` | ||
http_archive( | ||
name = "lowrisc_bazel_release", | ||
url = "<TODO>", | ||
sha256 = "<TODO>", | ||
strip_prefix = "<TODO>", | ||
) | ||
load("@lowrisc_bazel_release//:repos.bzl", "lowrisc_bazel_release_repos") | ||
lowrisc_bazel_release_repos() | ||
load("//:deps.bzl", "lowrisc_bazel_release_deps") | ||
lowrisc_bazel_release_deps() | ||
``` | ||
|
||
Then, in a `BUILD` file, instantiate the `release` rule: | ||
|
||
``` | ||
load("@lowrisc_bazel_release//release:release.bzl", "release") | ||
release( | ||
name = "release", | ||
artifacts = { | ||
"//:your_release_artifact": "Binary release of my project", | ||
}, | ||
) | ||
``` | ||
|
||
When you want to perform a release, run the `release` target: | ||
|
||
``` | ||
bazel run :release -- <your release tag name> | ||
``` | ||
|
||
Bazel will build your release artifacts, and then use the GitHub CLI to | ||
create a release on GitHub and upload your release artifacts. |