Merge pull request #40 from Sitlintac/update-dependencies-esm #66
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: CI/CD | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 20 | |
cache: "npm" | |
- run: npm ci | |
- run: npm test | |
release: | |
needs: test | |
# don't run on forks | |
if: ${{ github.repository_owner == 'SmartThingsCommunity' && github.ref == 'refs/heads/main' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 20 | |
cache: "npm" | |
- run: npm ci | |
- name: Release | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.PI_GITHUB_TOKEN }} | |
GIT_AUTHOR_NAME: smartthingspi | |
GIT_AUTHOR_EMAIL: [email protected] | |
GIT_COMMITTER_NAME: smartthingspi | |
GIT_COMMITTER_EMAIL: [email protected] | |
run: npx semantic-release |