-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15423 from mozilla/revert-gh-release-auto-version
Revert "chore(releases): compute the next train version in …
- Loading branch information
Showing
1 changed file
with
8 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
|
@@ -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 "[email protected]" | ||
- 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 |