fix: pipeline #3
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: Continuous Integration and Publish | |
on: | |
push: | |
branches: [ development, master ] | |
pull_request: | |
branches: [ development, master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [22.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm install && npm run lint | |
# - run: npm run test | |
# - run: npm run coverage | |
publish: | |
if: github.ref == 'refs/heads/master' && needs.build.result == 'success' | |
runs-on: ubuntu-latest | |
needs: build | |
strategy: | |
matrix: | |
node-version: [22.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm install && npm run lint | |
# - run: npm run test | |
# - run: npm run coverage | |
- id: publish | |
uses: JS-DevTools/npm-publish@v1 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
- if: steps.publish.outputs.type != 'none' | |
run: | | |
echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}" |