chore: add check-version to publish script (#2446)

This commit is contained in:
Alex Varchuk 2024-04-24 16:07:21 +03:00 committed by GitHub
parent 1f11f597c4
commit 9af774e443
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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