build: separate test & build

This commit is contained in:
Chen Asraf
2023-05-03 19:54:51 +03:00
parent 99318f7654
commit 9489f14db2
2 changed files with 14 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
name: Build Documentation
name: Documentation
on:
push:

View File

@@ -1,10 +1,10 @@
name: Semantic Release
name: Test & Build
on:
push:
branches: [ master, develop, feat/*, fix/* ]
jobs:
build:
test:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
@@ -14,6 +14,17 @@ jobs:
node-version: "18.x"
- run: yarn install --frozen-lockfile
- run: yarn test
if: "!contains(github.event.head_commit.message, '[skip test]')"
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
needs: test
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18.x"
- run: yarn install --frozen-lockfile
- run: yarn build
- run: cd ./dist && yarn pack --filename=../package.tgz
- run: yarn semantic-release