Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 23 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,33 @@
name: publish on release
name: Publish on Release

on: [release]
on:
release:
types: [published]

jobs:
build:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

- name: install dependencies
run: yarn
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'

- name: npm publish
run: |
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
npm publish || true
- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build
run: yarn build

- name: Publish to npm
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: npm publish --access public || true
48 changes: 34 additions & 14 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,50 @@
name: react-infinite-scroll-component
name: CI

on: [push]
on:
push:
branches: ['**']
pull_request:

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

- name: install dependencies
run: yarn
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: lint
- name: Lint
run: yarn lint

- name: prettier
- name: Prettier check
run: yarn prettier:check

- name: unit tests
run: yarn test

- name: ts type checks
- name: Type check
run: yarn ts-check

- uses: codecov/codecov-action@v1.0.3
- name: Unit tests
run: yarn test --coverage --runInBand

- name: Build package
run: yarn build

- name: Upload coverage to Codecov
if: matrix.node-version == '20.x'
uses: codecov/codecov-action@v4
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage/lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.info
flags: unittests
fail_ci_if_error: false
Loading