Skip to content

Last updates

Last updates #77

Workflow file for this run

name: react-day-picker@next
on:
push:
branches:
- next
pull_request:
branches:
- next
workflow_dispatch:
inputs:
publish:
description: Publish on npm
required: false
default: false
type: boolean
run_tests:
description: Run tests
required: false
default: false
type: boolean
jobs:
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.6.2
- uses: actions/setup-node@v3
with:
node-version: 18.16
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm typecheck
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.6.2
- uses: actions/setup-node@v3
with:
node-version: 18.16
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm lint --max-warnings=0
test:
needs: [lint, typecheck]
if: ${{ github.event_name == 'pull_request' || github.event.inputs.run_tests }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.6.2
- uses: actions/setup-node@v3
with:
node-version: 18.16
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm test
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.6.2
- uses: actions/setup-node@v3
with:
node-version: 18.16
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm build
- uses: actions/upload-artifact@v3
with:
name: rdp-dist
path: dist
publish-on-npm:
runs-on: ubuntu-latest
needs: [build]
if: ${{ github.event_name == 'push' || github.event.inputs.publish }}
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.6.2
- uses: actions/setup-node@v3
with:
node-version: 18.16
registry-url: https://registry.npmjs.org/
always-auth: false
- name: Configure Git
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
- uses: actions/download-artifact@v3
with:
name: rdp-dist
path: dist
- run: echo "//<npm-registry>:8080/:_authToken=$NODE_AUTH_TOKEN" > ~/.npmrc
- run: npm version prerelease --preid=next
- run: git push origin `git describe --tags`
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: npm publish --provenance --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}