-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e6b0679
commit 9d83cfb
Showing
2 changed files
with
38 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: Release | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
release_trigger: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: ./ci/release_branch.sh |
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,28 @@ | ||
#!/bin/bash | ||
|
||
function release_tag { | ||
git ls-remote --tags https://github.com/battlmonstr/silkworm.git | grep capi | cut -d '-' -f 2 | while read tag | ||
do | ||
if ! git branch | grep "release/$tag" > /dev/null | ||
then | ||
echo $tag | ||
break | ||
fi | ||
done | ||
} | ||
|
||
tag=$(release_tag) | ||
|
||
if [[ -z "$tag" ]] | ||
then | ||
echo "release tag not found" | ||
exit 1 | ||
fi | ||
|
||
branch="release/$tag" | ||
|
||
echo "release tag: $tag" | ||
echo "release branch: $branch" | ||
|
||
git checkout -b "$branch" | ||
git push --set-upstream origin "$branch" |