Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add check-version to publish script #2446

Merged
merged 2 commits into from
Apr 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/[email protected]
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
Loading