-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure automatic grpc releases (#303)
* Update README.md * Create grpc_release.yml
- Loading branch information
1 parent
90a93ef
commit 2244179
Showing
2 changed files
with
46 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# This worklow will create a new GH release according to the current GRPC_VERSION value in variables.sh | ||
# It is triggered after a PR from head "renovate/grpc-major-upgrade" is merged to master. | ||
|
||
# 'renovate/grpc-major-upgrade' is a branch created by Renovate when it finds a new gRPC version to update in variables.sh | ||
# Renovate with this worflow allows us to automatically create new releases whenever Google releases a new gRPC version in github.com/grpc/grpc | ||
|
||
# All new versions created by this worflow will be suffixed by _0, e.g v1.46_0. At the moment, patches unrelated to the gRPC version (e.g v1.46_1) | ||
# will still be released manually (for now). | ||
|
||
# Note that once a new release is created in GH, a separate workflow will take care of releasing new docker images to dockerhub accordingly. | ||
|
||
name: New gPRC Release | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- 'master' | ||
|
||
jobs: | ||
new_release: | ||
if: github.event.pull_request.merged == true && github.head_ref == 'renovate/grpc-major-upgrade' | ||
runs-on: ubuntu-latest | ||
steps: | ||
# checkout the repo | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
# install pcregrep to help extrat the version from variables.sh | ||
- name: Install pcregrep | ||
run: sudo sudo apt-get update -y && sudo apt-get install -y pcregrep | ||
- name: Get version name | ||
run: | | ||
VER=$(pcregrep -o1 "^GRPC_VERSION=\\$\{GRPC_VERSION:-(.*?)\\}$" variables.sh) | ||
# This makes the value accessible from env.Version | ||
echo "VERSION=v${VER}_0" >> $GITHUB_ENV | ||
- name: Create new release | ||
if: success() | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | ||
gh release create ${{ env.VERSION }} --generate-notes --repo $GITHUB_REPOSITORY | ||
|
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