-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #292 from EasyDynamics/develop
Sync `develop` to `main`
- Loading branch information
Showing
103 changed files
with
87,750 additions
and
46,434 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
name: Auto-update example app after Dependabot | ||
|
||
on: | ||
# Because we so heavily reference the pull request number within the workflow, | ||
# it is preferable to use the pull_request_target. This will run after every | ||
# pull request merged to develop that touches the main package-lock.json | ||
pull_request_target: | ||
types: [closed] | ||
branches: [develop] | ||
paths: ["package-lock.json"] | ||
|
||
jobs: | ||
update: | ||
# If the pull request was closed then nothing needs to be done | ||
if: github.event.pull_request_target.merged == true | ||
runs-on: ubuntu-latest | ||
name: Synchronize version | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
ref: develop | ||
- name: Setup NodeJS | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14 | ||
- name: Globally update npm | ||
run: npm install -g npm@latest | ||
- name: Install library dependencies | ||
run: npm ci | ||
- name: Update example application dependencies | ||
run: npm install | ||
working-directory: example | ||
- name: Commit back changes to example app | ||
uses: peter-evans/create-pull-request@v3 | ||
with: | ||
commit-message: >- | ||
Synchronize OSCAL Viewer example app depenencies | ||
title: Synchronize example app `package-lock.json` (#${{ github.event.pull_request.number }}) | ||
body: | | ||
Pull request #${{ github.event.pull_request.number }} which updated some dependencies in | ||
`/package-lock.json` was recently merged. This synchronizes those same updates back into | ||
the `example/package-lock.json` file. | ||
branch: automation/update-dependencies/${{ github.event.pull_request.number }} | ||
delete-branch: true | ||
base: develop | ||
committer: Easy Dynamics Automation <noreply@easydynamics.com> | ||
author: Easy Dynamics Automation <noreply@easydynamics.com> | ||
add-paths: | | ||
example/package.json | ||
example/package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
name: Publish to GitHub Packages | ||
on: | ||
push: | ||
branches: [develop] | ||
workflow_dispatch: | ||
|
||
concurrency: package-push | ||
|
||
jobs: | ||
publish: | ||
name: Publish OSCAL Viewer Build to GitHub Packages | ||
runs-on: ubuntu-20.04 | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Delete previous oscal-react-library version | ||
uses: actions/delete-package-versions@v2.0.1 | ||
with: | ||
package-name: oscal-react-library | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Setup NodeJS | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14 | ||
registry-url: https://npm.pkg.github.com/ | ||
cache: npm | ||
- name: Update Npm | ||
run: npm install -g npm@latest | ||
- name: Build and Publish Library | ||
run: | | ||
npm ci | ||
npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
name: Publish Storybook | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
concurrency: gh-pages | ||
|
||
jobs: | ||
publish: | ||
name: Publish Storybook to GitHub Pages | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Setup NodeJS | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14 | ||
cache: "npm" | ||
- name: Globally update npm | ||
run: npm install -g npm@latest | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Build Storybook | ||
run: npm run build-storybook | ||
- name: Deploy to Pages | ||
uses: JamesIves/github-pages-deploy-action@v4.2.5 | ||
with: | ||
branch: storybook-docs | ||
folder: storybook-static | ||
clean: true | ||
single-commit: true | ||
git-config-name: Easy Dynamics Automation | ||
git-config-email: noreply@easydynamics.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
--- | ||
name: Create a New Release | ||
on: | ||
push: | ||
branches: [EGRC-492-package] | ||
workflow_dispatch: | ||
inputs: | ||
release-type: | ||
description: >- | ||
The type of release; either a new feature (minor version) or bug fix | ||
(patch version) | ||
required: true | ||
type: choice | ||
options: [feature, bug] | ||
|
||
concurrency: package-repo-release | ||
|
||
jobs: | ||
release: | ||
name: Create a New Release | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
# Check out develop branch | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: develop | ||
|
||
- name: Setup NodeJS | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14 | ||
registry-url: https://npm.pkg.github.com/ | ||
cache: npm | ||
|
||
- name: Update Npm | ||
run: npm install -g npm@latest | ||
|
||
- name: Set Up Git User Info | ||
run: | | ||
git config --global user.email "info@easydynamics.com" | ||
git config --global user.name "${{ github.actor }}" | ||
# Increment the version to the next minor release | ||
- name: Set Version (Feature) | ||
if: ${{ github.event.inputs.release-type == 'feature' }} | ||
run: | | ||
npm version minor | ||
cd example | ||
npm version minor | ||
# Increment the version to the next bug fix | ||
# Push the new version to the develop branch | ||
- name: Set Version (Bug Fix) | ||
#if: ${{ github.event.inputs.release-type == 'bug' }} | ||
run: | | ||
npm version patch | ||
cd example | ||
npm version patch | ||
# Output the new package version to environment variable | ||
- name: Get Package Version | ||
run: | | ||
echo "PKG_VERSION=$(npm pkg get version | tr -d '"')" >> $GITHUB_ENV | ||
- name: Build OSCAL Viewer | ||
run: | | ||
npm ci | ||
cd example | ||
npm ci | ||
npm run build | ||
zip -r viewer.zip ./build/ | ||
- name: Create a GitHub Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: | ||
${{ env.PKG_VERSION }} | ||
files: | ||
example/viewer.zip | ||
|
||
# Commit the new version and push changes to main | ||
# And push a new preminor version to develop. | ||
# Should only run when triggered for a feature - for bug fixes | ||
# this should be done manually since a merge might be needed. | ||
- name: Push Changes | ||
if: ${{ github.event.inputs.release-type == 'feature' }} | ||
run: | | ||
git push origin develop:main | ||
git add ./{,example/}package{,-lock}.json | ||
git commit -m "Build Viewer for Release ${{ env.PKG_VERSION }}" | ||
npm version preminor | ||
cd example | ||
npm version preminor | ||
git push origin develop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,3 +79,4 @@ Thumbs.db | |
*.flv | ||
*.mov | ||
*.wmv | ||
example/.env.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
"stories": ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"], | ||
"addons": ["@storybook/addon-links", "@storybook/addon-essentials", "@storybook/preset-create-react-app"], | ||
core: { | ||
builder: "webpack5" | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export const parameters = { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
} |
Oops, something went wrong.