Skip to content

fix: use dateLib for getting days/months/years from a Date (#2643) #1888

fix: use dateLib for getting days/months/years from a Date (#2643)

fix: use dateLib for getting days/months/years from a Date (#2643) #1888

Workflow file for this run

name: react-day-picker
on:
release:
types: [published]
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
inputs:
publish:
description: Publish on npm
required: false
default: false
type: boolean
jobs:
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20.16
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm typecheck
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20.16
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm lint --max-warnings=0
test:
needs: [lint, typecheck]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20.16
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm test
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20.16
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm build
- uses: actions/upload-artifact@v4
with:
name: rdp-dist
path: dist
test-build:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20.16
cache: pnpm
- uses: actions/download-artifact@v4
with:
name: rdp-dist
- run: pnpm install --frozen-lockfile
- run: pnpm run build
- run: pnpm test:build
publish-on-npm:
runs-on: ubuntu-latest
needs: [build, test]
if: ${{ github.event_name == 'release' || github.event.inputs.publish }}
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20.16
registry-url: https://registry.npmjs.org/
always-auth: false
- uses: actions/download-artifact@v4
with:
name: rdp-dist
path: dist
- run: echo "//<npm-registry>:8080/:_authToken=$NODE_AUTH_TOKEN" > ~/.npmrc
- run: npm publish --provenance --tag latest
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}