From 63fb8d49a08d5e584a87f563e156c6767f65eab9 Mon Sep 17 00:00:00 2001 From: Bianca Danforth Date: Wed, 7 Jun 2023 14:53:42 -0400 Subject: [PATCH] Revert "chore(releases): compute the next train version in gh action" This reverts commit 84c2510c4525c7e79d01845ae2905c5a7de8aa1c. --- .github/workflows/tag-release.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml index 69af534d52c..8ec4bf3c76d 100644 --- a/.github/workflows/tag-release.yml +++ b/.github/workflows/tag-release.yml @@ -1,6 +1,10 @@ name: Tag Release on: workflow_dispatch: + inputs: + versionName: + description: 'What train is this? eg. 275' + required: true permissions: {} jobs: tagrelease: @@ -14,17 +18,10 @@ jobs: GITHUB_CONTEXT: ${{ toJson(github) }} run: echo "$GITHUB_CONTEXT" shell: bash - - name: Check out code uses: actions/checkout@v3 - - - name: Compute new version number - run: | - echo versionNumber=$(git tag -l --sort=version:refname | grep -v '-' | tail -1 | awk '{print $2 + 1}' FS='.') >> "$GITHUB_ENV" - - name: Create release branch - run: git checkout -b train-${{ env.versionNumber }} - + run: git checkout -b train-${{ github.event.inputs.versionName }} - name: Initialize mandatory git config run: | git config user.name "${{ github.triggering_actor }}" @@ -32,9 +29,9 @@ jobs: - name: Commit update to branch run: | - git push origin train-${{ env.versionNumber }} + git push origin train-${{ github.event.inputs.versionName }} - name: Make a new tag run: | - git tag -a "v1.${{ env.versionNumber }}.0" -m "Train release ${{ env.versionNumber }}" - git push origin v1.${{ env.versionNumber }}.0 + git tag -a "v1.${{ github.event.inputs.versionName }}.0" -m "Train release ${{ github.event.inputs.versionName }}" + git push origin v1.${{ github.event.inputs.versionName }}.0