mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-22 00:26:34 +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:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
branches: [main]
|
||||||
- v[0-9]*.[0-9]*.[0-9]*
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
bundle:
|
bundle:
|
||||||
|
@ -45,9 +44,27 @@ jobs:
|
||||||
name: bundles
|
name: bundles
|
||||||
path: bundles
|
path: bundles
|
||||||
- run: npm run e2e
|
- 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:
|
publish:
|
||||||
name: Publish to NPM
|
name: Publish to NPM
|
||||||
needs: [bundle, unit-tests, e2e-tests]
|
needs: [check-version]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
|
@ -77,7 +94,7 @@ jobs:
|
||||||
|
|
||||||
publish-cdn:
|
publish-cdn:
|
||||||
name: Publish to CDN
|
name: Publish to CDN
|
||||||
needs: [bundle, unit-tests, e2e-tests]
|
needs: [check-version]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
|
|
Loading…
Reference in New Issue
Block a user