Skip to content

chore: add husky and commitlint #34

chore: add husky and commitlint

chore: add husky and commitlint #34

Workflow file for this run

name: pipeline
on: [ push ]
env:
TAG_NAME: $(echo "${{ github.ref_name }}" | sed 's/[^a-zA-Z0-9._-]/_/g')
NVM_NODE_VERSION: 18
PROJECT: colors
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-and-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
env:
CURRENT_RUNNER: ${{ runner.name }}
- name: setup node
uses: ./.github/actions/node-manager
with:
node-version: ${{ env.NVM_NODE_VERSION }}
- name: build-and-lint
shell: bash
run: |
yarn install --production=false --frozen-lockfile
yarn build
yarn lint
dry-run-publish:
needs: [ build-and-lint ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
env:
CURRENT_RUNNER: ${{ runner.name }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: setup node
uses: ./.github/actions/node-manager
with:
node-version: ${{ env.NVM_NODE_VERSION }}
- name: dry-run-publish
shell: bash
run: |
yarn install --production=false --frozen-lockfile
yarn build
npm publish --access public --tag latest --dry-run
publish-npm:
needs: [ dry-run-publish ]
# TODO: not working yet
if: false
# if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
env:
CURRENT_RUNNER: ${{ runner.name }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: setup node
uses: ./.github/actions/node-manager
with:
node-version: ${{ env.NVM_NODE_VERSION }}
- name: publish-npm
shell: bash
run: |
yarn install --production=false --frozen-lockfile
yarn build
npm publish --access public --tag latest