Skip to content

Commit

Permalink
ci: Add workflow to update release branch
Browse files Browse the repository at this point in the history
This is needed to deploy from latest tag from netlify.
  • Loading branch information
debjitbis08 committed Nov 28, 2024
1 parent 9cb829f commit 57da177
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ indent_style = space
insert_final_newline = false
max_line_length = 120
tab_width = 4

[*.yml]
indent_size = 2
tab_width = 2
29 changes: 29 additions & 0 deletions .github/workflows/update-release-branch.yml
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

0 comments on commit 57da177

Please sign in to comment.