Merge pull request #235 from AthennaIO/develop #212
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
name: CD | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: '21.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install dependencies | |
run: npm install | |
- name: Compile code | |
run: npm run build | |
- name: Install production dependencies | |
run: cd build && npm ci --omit=dev | |
- name: Automatic GitHub Release | |
uses: justincy/github-action-npm-release@2.0.1 | |
id: release | |
- name: Publish to NPM Registry | |
run: cd build && npm publish --access public | |
if: steps.release.outputs.released == 'true' | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
name: Deploy |