Skip to content

Commit

Permalink
Create update_release_version.yml workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gehoule authored Nov 21, 2023
1 parent 796d1d1 commit 91018c4
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/update_release_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Update Release Version in app.tsx file
on:
workflow_dispatch:
create:
tags:
- 'v*'

env:
TAG_NAME: ${{ github.ref_name }}

jobs:
update_release_version:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Update Release Version
run: |
cd src
# Replace the version in app.tsx file
find . -type f -name "app.tsx" -exec sed -i "/title: 'Clip Zip Ship/s/: 'Clip Zip Ship.*/: 'Clip Zip Ship $my_var',/" {} +
- name: Commit and Push changes
run: |
git config user.name "GitHub Actions"
git commit -a -m "Updated release version to "${TAG_NAME}" in app.tsx files"
git push origin HEAD:$TAG_NAME --force

0 comments on commit 91018c4

Please sign in to comment.