Skip to content

Commit

Permalink
add github release action
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Valdes <[email protected]>
  • Loading branch information
ivanvc committed May 6, 2024
1 parent ad4baf0 commit c74dee7
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/release-update-website.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Release

on:
release:
types: [created]

jobs:
update_website:
name: Update website
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
repository: ivanvc/etcd-website
- env:
RELEASE_TAG: ${{ github.release.tag_name }}
run: |
minor="$(echo $RELEASE_TAG | cut -d. -f1-2)"
sed -i 's/git_version_tag:\sv\([0-9]\+\.\)\{2\}[0-9]\+/git_version_tag: '$RELEASE_TAG'/' "content/en/docs/$minor/_index.md"
git add "content/en/docs/$minor/_index.md"
git -c user.name="$GITHUB_ACTOR" -c user.email="[email protected]" commit -m "[$minor] Update installation version to latest tag ($RELEASE_TAG)"
git push origin main

0 comments on commit c74dee7

Please sign in to comment.