-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add workflow to update release branch
This is needed to deploy from latest tag from netlify.
- Loading branch information
1 parent
9cb829f
commit 57da177
Showing
2 changed files
with
33 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
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,29 @@ | ||
name: Update Release Branch | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
update-release-branch: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Fetch all history for tags and branches | ||
|
||
- name: Update release branch | ||
run: | | ||
# Get the latest tag | ||
LATEST_TAG=$(git describe --tags --abbrev=0) | ||
echo "Latest Tag: $LATEST_TAG" | ||
# Update the release branch to point to the latest tag | ||
git checkout release | ||
git reset --hard "$LATEST_TAG" | ||
# Push the updated release branch | ||
git push origin release --force |