-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SW-6856 Move tests to build.yml and add tag version job (#39)
* SW-6856 Move tests to build.yml and add tag version job * Remove unused aws cli line Co-authored-by: Greg Tyler <[email protected]> --------- Co-authored-by: Greg Tyler <[email protected]>
- Loading branch information
1 parent
0e820ea
commit 59c9f80
Showing
1 changed file
with
35 additions
and
1 deletion.
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,4 +1,4 @@ | ||
name: Test | ||
name: Build & Test | ||
|
||
on: | ||
pull_request: | ||
|
@@ -9,6 +9,10 @@ on: | |
- main | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
@@ -47,3 +51,33 @@ jobs: | |
files: /tmp/test-coverage.txt | ||
fail_ci_if_error: true | ||
verbose: true | ||
tag: | ||
name: "Tag Version" | ||
runs-on: ubuntu-latest | ||
outputs: | ||
branch: ${{ steps.set-outputs.outputs.branch }} | ||
tag: ${{ steps.bump_version.outputs.tag }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: "0" | ||
- name: Extract branch name | ||
run: | | ||
if [ "$GITHUB_EVENT_NAME" == "push" ]; then | ||
echo BRANCH_NAME=main >> $GITHUB_ENV | ||
else | ||
echo BRANCH_NAME=${{ github.head_ref }} >> $GITHUB_ENV | ||
fi | ||
id: extract_branch | ||
|
||
- name: Bump version | ||
if: github.actor != 'dependabot[bot]' | ||
id: bump_version | ||
uses: anothrNick/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
INITIAL_VERSION: 1.0.0 | ||
DEFAULT_BUMP: minor | ||
PRERELEASE_SUFFIX: ${{ env.BRANCH_NAME }} | ||
RELEASE_BRANCHES: main | ||
WITH_V: true |