Skip to content

Commit

Permalink
release trigger workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
battlmonstr committed Nov 22, 2023
1 parent e6b0679 commit 9d83cfb
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/release.yml
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
28 changes: 28 additions & 0 deletions ci/release_branch.sh
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"

0 comments on commit 9d83cfb

Please sign in to comment.