From 91018c4f3ccbf71937f624e4157f4787c1be6162 Mon Sep 17 00:00:00 2001 From: gehoule <36653517+gehoule@users.noreply.github.com> Date: Tue, 21 Nov 2023 17:01:16 -0500 Subject: [PATCH] Create update_release_version.yml workflow --- .github/workflows/update_release_version.yml | 28 ++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/update_release_version.yml diff --git a/.github/workflows/update_release_version.yml b/.github/workflows/update_release_version.yml new file mode 100644 index 0000000..335d089 --- /dev/null +++ b/.github/workflows/update_release_version.yml @@ -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