mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-21 16:16:33 +03:00
chore: add check-version to publish script (#2446)
This commit is contained in:
parent
1f11f597c4
commit
9af774e443
25
.github/workflows/publish.yml
vendored
25
.github/workflows/publish.yml
vendored
|
@ -2,8 +2,7 @@ name: Publish
|
|||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v[0-9]*.[0-9]*.[0-9]*
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
bundle:
|
||||
|
@ -45,9 +44,27 @@ jobs:
|
|||
name: bundles
|
||||
path: bundles
|
||||
- run: npm run e2e
|
||||
check-version:
|
||||
name: Check Version
|
||||
runs-on: ubuntu-latest
|
||||
needs: [bundle, unit-tests, e2e-tests]
|
||||
outputs:
|
||||
changed: ${{ steps.check.outputs.changed }}
|
||||
version: ${{ steps.check.outputs.version }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
- name: Check if version has been updated
|
||||
id: check
|
||||
uses: EndBug/version-check@v2.0.1
|
||||
with:
|
||||
file-url: https://cdn.jsdelivr.net/npm/redoc/package.json
|
||||
static-checking: localIsNew
|
||||
publish:
|
||||
name: Publish to NPM
|
||||
needs: [bundle, unit-tests, e2e-tests]
|
||||
needs: [check-version]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/setup-node@v3
|
||||
|
@ -77,7 +94,7 @@ jobs:
|
|||
|
||||
publish-cdn:
|
||||
name: Publish to CDN
|
||||
needs: [bundle, unit-tests, e2e-tests]
|
||||
needs: [check-version]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
|
Loading…
Reference in New Issue
Block a user