-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented release workflow using
bzlrelease
. (#43)
Implemented release workflow using bzlrelease. Renamed CI workflow and updated to use cgrindel/gha_set_up_bazel.
- Loading branch information
Showing
5 changed files
with
127 additions
and
13 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
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Create Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_tag: | ||
required: true | ||
type: string | ||
reset_tag: | ||
type: boolean | ||
default: false | ||
base_branch: | ||
description: The branch being merged to. | ||
type: string | ||
default: main | ||
|
||
jobs: | ||
create_release: | ||
runs-on: ubuntu-latest | ||
env: | ||
CC: clang | ||
|
||
steps: | ||
|
||
# Check out your code | ||
- uses: actions/checkout@v2 | ||
|
||
# Generate a token that has permssions to create a release and create PRs. | ||
- uses: tibdex/github-app-token@v1 | ||
id: generate_token | ||
with: | ||
app_id: ${{ secrets.APP_ID }} | ||
private_key: ${{ secrets.APP_PRIVATE_KEY }} | ||
|
||
# Configure the git user for the repository | ||
- uses: cgrindel/gha_configure_git_user@v1 | ||
|
||
# Create the release | ||
- uses: cgrindel/gha_create_release@v1 | ||
with: | ||
release_tag: ${{ github.event.inputs.release_tag }} | ||
reset_tag: ${{ github.event.inputs.reset_tag }} | ||
base_branch: ${{ github.event.inputs.base_branch }} | ||
github_token: ${{ steps.generate_token.outputs.token }} | ||
|
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
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
load("@cgrindel_bazel_starlib//bzlformat:defs.bzl", "bzlformat_pkg") | ||
load( | ||
"@cgrindel_bazel_starlib//bzlrelease:defs.bzl", | ||
"create_release", | ||
"generate_release_notes", | ||
"generate_workspace_snippet", | ||
"update_readme", | ||
) | ||
|
||
# MARK: - Release | ||
|
||
generate_workspace_snippet( | ||
name = "generate_workspace_snippet", | ||
template = "workspace_snippet.tmpl", | ||
) | ||
|
||
generate_release_notes( | ||
name = "generate_release_notes", | ||
generate_workspace_snippet = ":generate_workspace_snippet", | ||
) | ||
|
||
update_readme( | ||
name = "update_readme", | ||
generate_workspace_snippet = ":generate_workspace_snippet", | ||
) | ||
|
||
create_release( | ||
name = "create", | ||
workflow_name = "Create Release", | ||
) | ||
|
||
bzlformat_pkg(name = "bzlformat") |
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Download and configure rules_swiftformat. | ||
|
||
${http_archive_statement} | ||
|
||
load("@cgrindel_rules_swiftformat//swiftformat:deps.bzl", "swiftformat_rules_dependencies") | ||
|
||
swiftformat_rules_dependencies() | ||
|
||
# Configure the dependencies for rules_swiftformat | ||
|
||
load( | ||
"@cgrindel_bazel_starlib//:deps.bzl", | ||
"bazel_starlib_dependencies", | ||
) | ||
|
||
bazel_starlib_dependencies() | ||
|
||
load( | ||
"@cgrindel_rules_spm//spm:deps.bzl", | ||
"spm_rules_dependencies", | ||
) | ||
|
||
spm_rules_dependencies() | ||
|
||
load( | ||
"@build_bazel_rules_swift//swift:repositories.bzl", | ||
"swift_rules_dependencies", | ||
) | ||
|
||
swift_rules_dependencies() | ||
|
||
load( | ||
"@build_bazel_rules_swift//swift:extras.bzl", | ||
"swift_rules_extra_dependencies", | ||
) | ||
|
||
swift_rules_extra_dependencies() | ||
|
||
# We are using rules_spm to download and build SwiftFormat. The following will configure | ||
# rules_spm to do that. | ||
|
||
load("@cgrindel_rules_swiftformat//swiftformat:load_package.bzl", "swiftformat_load_package") | ||
|
||
swiftformat_load_package() |