Skip to content

ci: node start building with node 20 also #173

ci: node start building with node 20 also

ci: node start building with node 20 also #173

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
fossa-scan:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Code'
uses: actions/checkout@v4
- name: 'Run FOSSA Scan'
uses: fossas/fossa-action@main # Use a specific version if locking is preferred
with:
api-key: ${{ secrets.FOSSA_API_KEY }}
test:
runs-on: ubuntu-latest
if: (!contains(github.event.head_commit.message , 'ci skip') && !contains(github.event.head_commit.message, 'skip ci'))
strategy:
matrix:
node: ['18', '20']
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
- name: Install dependencies
run: yarn
- name: Format
run: yarn format:diff
- name: Lint
run: yarn lint
- name: Run Tests
run: yarn test:ci
build-and-release:
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
- name: Prepare repository
run: |
echo "Fetching git tags for auto"
git fetch --unshallow --tags
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: Build
run: yarn build
- name: Auto Info
run: yarn auto info
- name: Auto Release
if: github.ref == 'refs/heads/main'
run: yarn release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
TWITTER_CONSUMER_KEY_SECRET: ${{ secrets.TWITTER_CONSUMER_KEY_SECRET }}
SKIP_PREFLIGHT_CHECK: true