From 39404e3c09d9f829ec4ef2e3d1d0dec789593795 Mon Sep 17 00:00:00 2001 From: Thomas Hirter <15847494+Memurame@users.noreply.github.com> Date: Fri, 21 Jun 2024 13:08:40 +0200 Subject: [PATCH] Create update_version (#124) --- .github/workflows/update_version | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/update_version diff --git a/.github/workflows/update_version b/.github/workflows/update_version new file mode 100644 index 0000000..abdc440 --- /dev/null +++ b/.github/workflows/update_version @@ -0,0 +1,30 @@ +name: Update Release Version + +on: + release: + types: [published] + +jobs: + update-version: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Get release tag + id: get_tag + run: echo "RELEASE_TAG=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV + + - name: Create release version file + run: echo "${{ env.RELEASE_TAG }}" > release_version.txt + + - name: Commit release version file + run: | + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + git add release_version.txt + git commit -m "Update release version to ${{ env.RELEASE_TAG }}" + git push