Skip to content

Commit

Permalink
chore: add check-version to publish script (#2446)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVarchuk authored Apr 24, 2024
1 parent 1f11f59 commit 9af774e
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: Publish

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

jobs:
bundle:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9af774e

Please sign in to comment.