Skip unsupported xterm-256color.Setulc for now #37
Workflow file for this run
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 | |
on: | |
push: | |
paths-ignore: | |
- "*.md" | |
branches: [master] | |
tags: | |
- "*" | |
pull_request: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "20" | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.npm | |
~/.nvm | |
~/work/blessed/blessed/node_modules | |
~/work/blessed/blessed/package-lock.json | |
key: ${{ runner.os }}-node_modules-cache-v1-${{ hashFiles('package.json') }} | |
restore-keys: | | |
${{ runner.os }}-node_modules-cache-v1- | |
- name: Extract Tag Name | |
run: echo "TAG_NAME=$(echo ${GITHUB_REF##*/})" >> $GITHUB_ENV | |
if: ${{ startsWith(github.ref, 'refs/tags') }} | |
- name: Run tests | |
run: | | |
npm i | |
npx tsc | |
npx quick-lint-js ./**/*.mjs | |
node ./test/all.mjs | |
if: ${{ env.TAG_NAME == '' }} | |
- name: Build SNAPSHOT | |
run: npm pack | |
if: ${{ env.TAG_NAME == '' }} | |
- name: Publish RELEASE | |
run: | | |
VERSION="$(echo "$TAG_NAME" | cut -d'v' -f 2)" | |
echo "Publish a release version=$VERSION for tag $TAG_NAME" | |
npm --no-git-tag-version --allow-same-version version $VERSION | |
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc | |
npm publish | |
if: ${{ env.TAG_NAME != '' }} | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |