Skip to content

Commit

Permalink
SW-6856 Move tests to build.yml and add tag version job (#39)
Browse files Browse the repository at this point in the history
* 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
josephsmith0705 and gregtyler authored Apr 29, 2024
1 parent 0e820ea commit 59c9f80
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion .github/workflows/test.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: Build & Test

on:
pull_request:
Expand All @@ -9,6 +9,10 @@ on:
- main
workflow_dispatch:

defaults:
run:
shell: bash

jobs:
test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -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

0 comments on commit 59c9f80

Please sign in to comment.