Merge pull request #598 from Availity/feat/dialog-styles #310
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 workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Publish Release | |
on: | |
push: | |
branches: [main] | |
jobs: | |
setup: | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.BOT_TOKEN }} | |
fetch-depth: 0 | |
ref: 'main' | |
- name: Derive appropriate SHAs for base and head for `nx affected` commands | |
uses: nrwl/nx-set-shas@v3 | |
- name: Set Node Version | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: | | |
echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | |
- name: Restore yarn cache | |
uses: actions/cache@v3 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-20-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-20-yarn- | |
- name: Install Dependencies | |
run: yarn install --immutable | |
- name: Lint Affected Code | |
run: yarn lint:affected | |
- name: Unit Test Affected Code | |
run: yarn test:affected | |
release: | |
needs: [setup] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.BOT_TOKEN }} | |
fetch-depth: 0 | |
ref: 'main' | |
- name: Derive appropriate SHAs for base and head for `nx affected` commands | |
uses: nrwl/nx-set-shas@v3 | |
- name: Set Node Version | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: | | |
echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | |
- name: Restore yarn cache | |
uses: actions/cache@v3 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-20-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-20-yarn- | |
- name: Install Dependencies | |
run: yarn install --immutable | |
- name: Build Packages | |
run: yarn build | |
# TODO: ngx-deploy-npm? Or continue to leverage nx + yarn npm publish command? | |
- name: Release | |
run: | | |
yarn config set npmAuthToken "${{ secrets.NPM_TOKEN }}" | |
git config --global user.email ${{ secrets.GH_EMAIL }} | |
git config --global user.name ${{ secrets.GH_USER }} | |
yarn version:affected | |
yarn publish:affected | |
git push && git push --tags | |
- name: Build Docs | |
run: yarn build:storybook:ci | |
- name: Deploy Docs | |
uses: crazy-max/ghaction-github-pages@v3 | |
with: | |
target_branch: gh-pages | |
build_dir: dist/storybook | |
commit_message: deployed docs [skip ci] | |
committer: ${{ secrets.GH_USER }} ${{ secrets.GH_EMAIL }} | |
jekyll: false | |
keep_history: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} | |
# - name: Deploy Docs (using same deploy action as preview) | |
# uses: JamesIves/github-pages-deploy-action@v4 | |
# with: | |
# branch: gh-pages | |
# folder: dist/storybook | |
# commit-message: deployed docs [skip ci] | |
# force: false | |
# clean-exclude: pr-preview |