Skip to content

Commit

Permalink
Merge pull request #15423 from mozilla/revert-gh-release-auto-version
Browse files Browse the repository at this point in the history
Revert "chore(releases): compute the next train version in …
  • Loading branch information
biancadanforth authored Jun 7, 2023
2 parents 404b588 + 63fb8d4 commit 6d3b573
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 6d3b573

Please sign in to comment.