mirror of
https://github.com/Redocly/redoc.git
synced 2025-02-07 13:30:33 +03:00
chore: update publish cli workflow
This commit is contained in:
parent
e621535dc7
commit
aeb276aaf1
19
.github/workflows/publish-cli.yml
vendored
19
.github/workflows/publish-cli.yml
vendored
|
@ -2,12 +2,14 @@ name: Publish cli
|
|||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v[0-9]*.[0-9]*.[0-9]*
|
||||
branches:
|
||||
- master
|
||||
|
||||
|
||||
jobs:
|
||||
bundle:
|
||||
needs: [ check-version-cli ]
|
||||
if: needs.check-version-cli.outputs.changed == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -29,13 +31,15 @@ jobs:
|
|||
path: bundles
|
||||
retention-days: 1
|
||||
unit-tests:
|
||||
needs: [ check-version-cli ]
|
||||
if: needs.check-version-cli.outputs.changed == 'true'
|
||||
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
|
||||
|
@ -43,10 +47,12 @@ jobs:
|
|||
- 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 ]
|
||||
if: needs.check-version-cli.outputs.changed == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -72,7 +78,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:
|
||||
|
@ -88,7 +93,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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user