Skip to content

Commit

Permalink
Revert "chore(releases): compute the next train version in gh action"
Browse files Browse the repository at this point in the history
This reverts commit 84c2510.
  • Loading branch information
biancadanforth committed Jun 7, 2023
1 parent 404b588 commit 63fb8d4
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Tag Release
on:
workflow_dispatch:
inputs:
versionName:
description: 'What train is this? eg. 275'
required: true
permissions: {}
jobs:
tagrelease:
Expand All @@ -14,27 +18,20 @@ 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 }}"
git config user.email "noreply@github.com"
- 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

0 comments on commit 63fb8d4

Please sign in to comment.