Skip to content

Commit

Permalink
chore: update publish cli workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanHotsiy committed Oct 11, 2021
1 parent e621535 commit c621c6e
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/publish-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ name: Publish cli

on:
push:
tags:
- v[0-9]*.[0-9]*.[0-9]*
branches:
- master


jobs:
bundle:
needs: [ check-version-cli ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -29,24 +30,26 @@ jobs:
path: bundles
retention-days: 1
unit-tests:
needs: [ check-version-cli ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: npm ci
- run: npm test
e2e-tests:
needs: [bundle]
needs: [ bundle ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: npm ci
- name: Download bundled artifact
uses: actions/download-artifact@v2
with:
name: bundles
path: bundles-cli
name: bundles-cli
path: bundles
- run: npm run e2e
bundle-cli:
needs: [ check-version-cli ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -72,7 +75,6 @@ jobs:
check-version-cli:
name: Check Version
runs-on: ubuntu-latest
needs: [bundle-cli, unit-tests, e2e-tests]
outputs:
changed: ${{ steps.check.outputs.changed }}
steps:
Expand All @@ -88,7 +90,7 @@ jobs:
file-url: https://unpkg.com/redoc-cli/package.json
static-checking: localIsNew
publish-cli:
needs: [ check-version-cli ]
needs: [bundle-cli, unit-tests, e2e-tests]
if: needs.check-version-cli.outputs.changed == 'true'
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit c621c6e

Please sign in to comment.