-
-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
3 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,19 @@ | ||
name: Build Apps, Deploy Web and Create Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- inherit # todo remove, can't workflow_dispatch from branch | ||
|
||
workflow_call: | ||
inputs: | ||
release_branch_prefix: | ||
description: "Release branch prefix (e.g. `test-release`)" | ||
default: "test-release" | ||
tag_prefix: | ||
description: "Tag prefix (e.g. `test-`)" | ||
default: "test-" | ||
|
||
workflow_dispatch: | ||
inputs: | ||
release_branch_prefix: | ||
|
@@ -30,7 +43,7 @@ jobs: | |
- name: Verify provided version not already released | ||
run: | | ||
git fetch --tags | ||
TAG_NAME="${{ github.event.inputs.tag_prefix }}${{ steps.get_current_version.outputs.version }}" | ||
TAG_NAME="${{ inputs.tag_prefix }}${{ steps.get_current_version.outputs.version }}" | ||
if git rev-parse "$TAG_NAME" >/dev/null 2>&1; then | ||
echo "Error: Tag $TAG_NAME already exists" | ||
exit 1 | ||
|
@@ -61,11 +74,11 @@ jobs: | |
|
||
- name: Commit and push release | ||
run: | | ||
git checkout -b ${{ github.event.inputs.release_branch_prefix }}/${{ needs.validate_version.outputs.version }} | ||
git checkout -b ${{ inputs.release_branch_prefix }}/${{ needs.validate_version.outputs.version }} | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Voyager CI" | ||
git add . | ||
git commit -m "Release ${{ needs.validate_version.outputs.version }} (${{ github.run_number }})" | ||
git tag ${{ github.event.inputs.tag_prefix }}${{{ needs.validate_version.outputs.version }} | ||
git tag ${{ inputs.tag_prefix }}${{{ needs.validate_version.outputs.version }} | ||
git push origin HEAD | ||
git push --tags |