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

Conditional cicd npm version major #11

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
10 changes: 9 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,16 @@ jobs:
with:
node-version: 14
registry-url: https://registry.npmjs.org/
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
src_static:
- 'src/static/**'
src_templates:
- 'src/templates/**'
- name: Increment Version (for security - and CSP asset alignment - every change to the template files is a breaking change)
# TODO: Make this conditional on if template files have actually changed
if: steps.filter.outputs.src_static == 'true' || steps.filter.outputs.src_templates == 'true'
run: npm version major
- name: Install and Build using incremented version
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,4 +215,4 @@ All changes that impact the output dataset site templates or static assets MUST

Minor and patch version numbers may be used to update any functionality of the npm library that impacts direct users of that library, but does not impact the templates or static assets themselves.

*NOTE*: All commits to master currently trigger a major version bump in CI by default.
*NOTE*: Only commits to master src/static/ and src/templates/ currently trigger a major version bump in CI by default.
Loading