-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This reverts commit 59f119d.
- Loading branch information
1 parent
59f119d
commit c68e772
Showing
2 changed files
with
81 additions
and
3 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,76 @@ | ||
name: release-branch | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- '*.*.*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
branch-out: | ||
name: Create a github branch | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Get the branch version | ||
id: get_branch | ||
run: | | ||
BRANCH=${GITHUB_REF/refs\/tags\//} | ||
if ${{github.event_name == 'workflow_dispatch'}}; then | ||
BRANCH=$(git describe --abbrev=0 --tags) | ||
fi | ||
echo "BRANCH=$(echo ${BRANCH} | cut -d '.' -f1-2 | tr -d 'v')" >> $GITHUB_OUTPUT | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.23" | ||
id: go | ||
|
||
- name: Bump patch version | ||
run: make patch | ||
|
||
- name: Create new branch and commit changes to the minor branch | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
default_author: user_info | ||
message: 'Update patch version' | ||
new_branch: ${{ steps.get_branch.outputs.BRANCH }} | ||
author_name: elasticcloudclients | ||
author_email: [email protected] | ||
|
||
bump-minor-version: | ||
name: Bump main version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: master | ||
fetch-depth: 0 | ||
token: ${{ secrets.GH_TOKEN_EXTRA }} | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.23" | ||
id: go | ||
|
||
- name: Bump main version | ||
run: make minor; git diff | ||
|
||
- name: Commit changes to main | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
default_author: user_info | ||
message: 'Update minor version' | ||
branch: master | ||
author_name: elasticcloudclients | ||
author_email: [email protected] |
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