Less complicated branch config #6
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: Publish cht-deploy to npm | |
on: | |
push: | |
branches: | |
- '**' | |
paths: | |
- 'scripts/deploy/**' | |
jobs: | |
publish-cht-deploy: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./scripts/deploy | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20.x' | |
- name: Install dependencies | |
run: npm ci | |
- name: Run tests | |
if: github.ref != 'refs/heads/master' | |
run: npx mocha --no-config 'tests/*.js' | |
- name: Semantic Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npx semantic-release --config ./scripts/deploy/.releaserc.json |