Skip to content

Commit 07705db

Browse files
Merge pull request #84 from LottieFiles/develop
Added changesets and dual deployment
2 parents 4db05b7 + 3de49ba commit 07705db

File tree

8 files changed

+502
-33
lines changed

8 files changed

+502
-33
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "master",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.changeset/red-spoons-shop.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@lottiefiles/react-lottie-player': patch
3+
---
4+
5+
changes type for the renderer variable

.github/workflows/release.yml

Lines changed: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ name: Release
22

33
on:
44
push:
5-
branches: [master, beta]
5+
branches: [master]
66

77
jobs:
8-
release:
9-
name: Release
10-
8+
build:
119
runs-on: ubuntu-latest
1210
timeout-minutes: 15
1311

@@ -20,7 +18,6 @@ jobs:
2018
uses: actions/checkout@v2
2119
with:
2220
fetch-depth: 0
23-
2421
- name: Cache NPM
2522
uses: actions/cache@v2
2623
env:
@@ -30,13 +27,11 @@ jobs:
3027
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn-lock.json') }}
3128
restore-keys: |
3229
${{ runner.os }}-build-${{ env.cache-name }}-
33-
3430
- name: Setup Node.js ${{ matrix.node-version }}
3531
uses: actions/setup-node@v1
3632
with:
3733
node-version: ${{ matrix.node-version }}
3834
registry-url: 'https://npm.pkg.github.com'
39-
4035
- name: Install dependencies
4136
run:
4237
yarn install |
@@ -49,17 +44,55 @@ jobs:
4944
run: yarn run start-and-run-tests
5045
env:
5146
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
52-
5347
- name: Run linting
5448
run: yarn lint
5549
env:
5650
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
57-
51+
- name: Bump version
52+
run: yarn run version
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5855
- name: Build project
5956
run: yarn build
6057

61-
- name: Release
62-
run: yarn release
58+
release-npm:
59+
needs: build
60+
name: Release npm
61+
runs-on: ubuntu-latest
62+
steps:
63+
- uses: actions/checkout@v1
64+
- uses: actions/setup-node@v1
65+
with:
66+
node-version: ${{ matrix.node-version }}
67+
registry-url: https://registry.npmjs.org/
68+
- run: yarn install --frozen-lockfile
69+
- run: npm publish --tag beta --access public
70+
env:
71+
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
72+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+
NPM_TOKEN: ${{ secrets.NPMJS_TOKEN }}
74+
GIT_COMMIT: ${{ github.sha }}
75+
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
76+
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
77+
GIT_COMMITTER_NAME: ${{ secrets.GIT_COMMITTER_NAME }}
78+
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }}
79+
80+
release-gpr:
81+
needs: build
82+
name: Release gpr
83+
runs-on: ubuntu-latest
84+
steps:
85+
- uses: actions/checkout@v1
86+
- uses: actions/setup-node@v1
87+
with:
88+
node-version: ${{ matrix.node-version }}
89+
registry-url: https://npm.pkg.github.com/
90+
scope: '@lottiefiles'
91+
- run: yarn install --frozen-lockfile
92+
- run:
93+
echo "//npm.pkg.github.com:_authToken=${{ secrets.GITHUB_TOKEN }}" >
94+
~/.npmrc
95+
- run: npm publish --tag beta --@lottiefiles:registry=https://npm.pkg.github.com/
6396
env:
6497
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6598
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,58 @@
11
# Changelog
2-
All notable changes to this project will be documented in this file.
3-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), enforced with [semantic-release](https://github.com/semantic-release/semantic-release).
42

3+
## 3.4.3
54

6-
## [3.4.2](https://github.com/LottieFiles/lottie-react/compare/v3.4.1...v3.4.2) (2022-02-22)
5+
### Patch Changes
6+
7+
- bumping package version to correct number
8+
9+
## 3.3.1
710

11+
### Patch Changes
12+
13+
- added changesets All notable changes to this project will be documented in this file. The format is based on
14+
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to
15+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html), enforced with
16+
[semantic-release](https://github.com/semantic-release/semantic-release).
17+
18+
## [3.4.2](https://github.com/LottieFiles/lottie-react/compare/v3.4.1...v3.4.2) (2022-02-22)
819

920
### Bug Fixes
1021

11-
* fixed speed affecting all lotties on a page ([92cec07](https://github.com/LottieFiles/lottie-react/commit/92cec07ce0fb3239883179c8a4fd344806cc29ba))
22+
- fixed speed affecting all lotties on a page
23+
([92cec07](https://github.com/LottieFiles/lottie-react/commit/92cec07ce0fb3239883179c8a4fd344806cc29ba))
1224

1325
## [3.4.1](https://github.com/LottieFiles/lottie-react/compare/v3.4.0...v3.4.1) (2021-08-27)
1426

15-
1627
### Bug Fixes
1728

18-
* **player:** added null check on window ([b1498ae](https://github.com/LottieFiles/lottie-react/commit/b1498ae73aa56d5ff392120e9935b09cdad3df56))
29+
- **player:** added null check on window
30+
([b1498ae](https://github.com/LottieFiles/lottie-react/commit/b1498ae73aa56d5ff392120e9935b09cdad3df56))
1931

2032
# [3.4.0](https://github.com/LottieFiles/lottie-react/compare/v3.3.1...v3.4.0) (2021-08-27)
2133

22-
2334
### Features
2435

25-
* **window:** added lottie to the window object ([f587f7f](https://github.com/LottieFiles/lottie-react/commit/f587f7f2ad16aa8b58119aaac94e7c777354edf9))
36+
- **window:** added lottie to the window object
37+
([f587f7f](https://github.com/LottieFiles/lottie-react/commit/f587f7f2ad16aa8b58119aaac94e7c777354edf9))
2638

2739
## [3.3.1](https://github.com/LottieFiles/lottie-react/compare/v3.3.0...v3.3.1) (2021-05-24)
2840

29-
3041
### Bug Fixes
3142

32-
* **onhover bugfix:** onhover bug fixz ([2bfa12b](https://github.com/LottieFiles/lottie-react/commit/2bfa12b38482c9dd992bfcf738c2a7a684fd1aca))
43+
- **onhover bugfix:** onhover bug fixz
44+
([2bfa12b](https://github.com/LottieFiles/lottie-react/commit/2bfa12b38482c9dd992bfcf738c2a7a684fd1aca))
3345

3446
# [3.3.0](https://github.com/LottieFiles/lottie-react/compare/v3.2.0...v3.3.0) (2021-05-18)
3547

36-
3748
### Features
3849

39-
* **player core:** added onhover function ([a2dc06c](https://github.com/LottieFiles/lottie-react/commit/a2dc06c1d60535fcd834da45c0611dbdece147ed))
50+
- **player core:** added onhover function
51+
([a2dc06c](https://github.com/LottieFiles/lottie-react/commit/a2dc06c1d60535fcd834da45c0611dbdece147ed))
4052

4153
# [3.2.0](https://github.com/LottieFiles/lottie-react/compare/v3.1.4...v3.2.0) (2021-05-10)
4254

43-
4455
### Features
4556

46-
* **packages update:** testing build pipeline. CI/CD ([5cb47ff](https://github.com/LottieFiles/lottie-react/commit/5cb47ff9f6f02873afcbeaf004dbf23ef556ad2c))
57+
- **packages update:** testing build pipeline. CI/CD
58+
([5cb47ff](https://github.com/LottieFiles/lottie-react/commit/5cb47ff9f6f02873afcbeaf004dbf23ef556ad2c))

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,37 @@ Seek to a given frame. Frame value can be a number or a percent string (e.g. 50%
255255

256256
Type: `void`
257257

258+
## Contributing
259+
260+
We use changesets to maintain a changelog for this repository. When making any change to the codebase that impacts functionality or performance we require a changeset to be present.
261+
262+
To add a changeset run:
263+
264+
```
265+
yarn run changeset
266+
```
267+
268+
And select the type of version bump you'd like (major, minor, path).
269+
270+
You can document the change in detail and format it properly using Markdown by opening the ".md" file that the "yarn changeset" command created in the ".changeset" folder. Open the file, it should look something like this:
271+
272+
```
273+
---
274+
"@lottiefiles/pkg1": minor
275+
"@lottiefiles/pkg2": major
276+
---
277+
278+
This is where you document your **changes** using Markdown.
279+
280+
- You can write
281+
- However you'd like
282+
- In as much detail as you'd like
283+
284+
Aim to provide enough details so that team mates and future you can understand the changes and the context of the change.
285+
```
286+
287+
You can commit your changes and the changeset to your branch and then create a pull request on the develop branch.
288+
258289
## License
259290

260291
MIT License © LottieFiles.com

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"devDependencies": {
1212
"@babel/core": "^7.9.6",
1313
"@babel/preset-env": "^7.16.11",
14+
"@changesets/cli": "^2.21.1",
1415
"@commitlint/cli": "^12.1.1",
1516
"@commitlint/config-conventional": "^12.1.1",
1617
"@cypress/code-coverage": "^3.9.12",
@@ -96,7 +97,7 @@
9697
"lint:fix": "eslint . --ext .ts,.tsx,.js --fix",
9798
"storybook": "start-storybook -p 9009",
9899
"build-storybook": "build-storybook",
99-
"release": "semantic-release"
100+
"version": "yarn changeset version"
100101
},
101102
"repository": {
102103
"type": "git",

0 commit comments

Comments
 (0)