Skip to content

Commit

Permalink
Merge pull request #480 from hypeserver/tool/github-action-npm-publish
Browse files Browse the repository at this point in the history
Add npm publish github action on release/* tag addition + bump to version 1.1.4
  • Loading branch information
kamyar authored May 30, 2021
2 parents 93b803b + 62f63b6 commit d75d912
Show file tree
Hide file tree
Showing 9 changed files with 2,765 additions and 2,256 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Publish
on:
push:
tags:
- release/*
jobs:
build:
name: NPM Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Publish new version to NPM
uses: actions/setup-node@v1
with:
node-version: 13.x
registry-url: 'https://registry.npmjs.org'
- run: yarn install
- run: yarn build
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ node_modules/
lib/
NOTES.txt
styleguide/
dist/
dist/
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ NEW
```js
<Calendar
date={this.state.eventDate} // js object
onChange={date => this.setState({ eventDate: date })} //
onChange={date => this.setState({ eventDate: date })} //
/>
```

NEW with moment (or any other date libraries)
```js
<Calendar
date={this.state.eventDate.toDate()} // convert moment object to js Date
onChange={date => this.setState({ eventDate: moment(date) })} //
onChange={date => this.setState({ eventDate: moment(date) })} //
/>
```
- BREAKING: Theming and style approach complately changed. `react-date-range` don't use inline styles any more. At the new version you should import **skeleton styles** and **theme styles**
Expand All @@ -86,7 +86,7 @@ import 'react-date-range/dist/theme/default.css';
NEW
```js
import turkish from 'react-date-range/locale/tr';
// you can view full list in https://github.com/Adphorus/react-date-range/tree/next/src/locale/index.js
// you can view full list in https://github.com/hypeserver/react-date-range/tree/next/src/locale/index.js
<Calendar locale={turkish} />
```

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing Guide

Make sure your issue or feature doesn't have any related issue at [react-date-range repo](https://github.com/Adphorus/react-date-range/issues). If it didn't exist already, create an issue.
Make sure your issue or feature doesn't have any related issue at [react-date-range repo](https://github.com/hypeserver/react-date-range/issues). If it didn't exist already, create an issue.

## Getting Started

Expand Down
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
The MIT License (MIT)
Copyright (c) 2015-2016 Adphorus
Copyright (c) 2015-2020 Adphorus
Copyright (c) 2020- Hypeserver

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ fixedHeight | Boolean | false | Since some
renderStaticRangeLabel(`DefinedRange`)| Function | | Callback function to be triggered for the static range configurations that have `hasCustomRendering: true` on them. Instead of rendering `staticRange.label`, return value of this callback will be rendered.
staticRanges(`DefinedRange`, `DateRangePicker`) | Array | [default preDefined ranges](https://github.com/hypeserver/react-date-range/blob/master/src/defaultRanges.js) | -
inputRanges(`DefinedRange`, `DateRangePicker`) | Array | [default input ranges](https://github.com/hypeserver/react-date-range/blob/master/src/defaultRanges.js) | -
ariaLabels | **Object | {} | inserts aria-label to inner elements
ariaLabels | Object | {} | inserts aria-label to inner elements

*shape of range:
```js
Expand All @@ -158,9 +158,9 @@ ariaLabels | **Object | {} | inserts aria-label to inner elements
{
// The key of dateInput should be same as key in range.
dateInput: PropTypes.objectOf(
PropTypes.shape({
PropTypes.shape({
startDate: PropTypes.string,
endDate: PropTypes.string
endDate: PropTypes.string
})
),
monthPicker: PropTypes.string,
Expand Down
2 changes: 1 addition & 1 deletion demo/components/StyleGuide.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function StyleGuideRenderer({ classes, title, homepageUrl, children }) {
</a>
</Logo>
<nav className={classes.nav}>
<a className={classes.headerLink} href="https://github.com/Adphorus/react-date-range">
<a className={classes.headerLink} href="https://github.com/hypeserver/react-date-range">
GitHub
</a>
</nav>
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-date-range",
"version": "1.1.3",
"version": "1.1.4",
"description": "A React component for choosing dates and date ranges.",
"main": "dist/index.js",
"scripts": {
Expand All @@ -22,16 +22,17 @@
"contributors": [
"Burak Can <[email protected]> (https://github.com/burakcan)",
"Mehmet Kamil Morcay <[email protected]> (https://github.com/mkg0)",
"Kamyar Ghasemlou <[email protected]> (https://github.com/kamyar)",
"Engin Semih Basmacı <[email protected]> (https://github.com/mortargrind)",
"Onur Kerimov <[email protected]> (https://github.com/onurkerimov)"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "http://github.com/Adphorus/react-date-range"
"url": "http://github.com/hypeserver/react-date-range"
},
"bugs": {
"url": "http://github.com/Adphorus/react-date-range/issues"
"url": "http://github.com/hypeserver/react-date-range/issues"
},
"browserslist": [
"defaults"
Expand Down
Loading

0 comments on commit d75d912

Please sign in to comment.