-
Notifications
You must be signed in to change notification settings - Fork 104
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
6d11768
commit d09ae2a
Showing
4 changed files
with
11 additions
and
30 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 |
---|---|---|
|
@@ -2,10 +2,9 @@ name: release-relayer | |
|
||
on: | ||
push: | ||
paths: | ||
- "relayer/**" | ||
branches: | ||
- main | ||
- more-logs | ||
workflow_dispatch: | ||
|
||
env: | ||
|
@@ -60,43 +59,20 @@ jobs: | |
git config --global user.name 'github-actions' | ||
git config --global user.email '[email protected]' | ||
- name: Determine new version | ||
id: new_version | ||
run: | | ||
# Get the most recent tag in the format relayer-v<version> | ||
current_tag=$(git tag --list "relayer-v*" --sort=-v:refname | head -n 1) | ||
current_version=$(git tag --list "relayer-v*" --sort=-v:refname | head -n 1 | sed -E 's/relayer-v//') | ||
echo "Current version: $current_version" | ||
# If there is no current version, set it to 1.0.0 | ||
if [ -z "$current_version" ]; then | ||
new_version="1.0.0" | ||
else | ||
new_version=$(npx semver $current_version -i patch) | ||
fi | ||
echo "New version: $new_version" | ||
echo "version=$new_version" >> $GITHUB_OUTPUT | ||
echo "from_tag=$current_tag" >> $GITHUB_OUTPUT | ||
- name: Create new tag | ||
id: create_tag | ||
run: | | ||
tag_name="relayer-v${{ steps.new_version.outputs.version }}" | ||
tag_name="relayer-more-logs" | ||
echo "Tag name: $tag_name" | ||
echo "tag=$tag_name" >> $GITHUB_OUTPUT | ||
git tag $tag_name | ||
- name: Push new tag | ||
run: | | ||
git push origin --tags | ||
# - name: Push new tag | ||
# run: | | ||
# git push origin --tags | ||
|
||
- name: "Build Changelog" | ||
id: build_changelog | ||
uses: mikepenz/release-changelog-builder-action@v4 | ||
with: | ||
fromTag: ${{ steps.new_version.outputs.from_tag }} | ||
toTag: ${{ steps.create_tag.outputs.tag }} | ||
|
||
- name: Create a GitHub Release | ||
id: create_release | ||
|
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
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