Merge pull request #430 from Availity/fix/update-deps #277
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: [master] | |
jobs: | |
deploy: | |
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 | |
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- 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 "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v3 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install Dependencies | |
run: yarn | |
- name: Lint | |
run: yarn lint | |
- name: Unit Test | |
run: yarn test | |
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc | |
- run: git config --global user.email ${{ secrets.GH_EMAIL }} | |
- run: git config --global user.name ${{ secrets.GH_USER }} | |
- run: yarn release --no-verify # skip lifecycle checks for automated releases | |
- run: git push --follow-tags origin ${GITHUB_REF##*/} && npm publish |