Skip to content

Commit

Permalink
chore: add release workflow (#6)
Browse files Browse the repository at this point in the history
* chore: add release workflow

* chore: update the package name

* chore: update README
  • Loading branch information
theashraf authored Oct 8, 2024
1 parent 3e24262 commit 5eb6291
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 36 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release

on:
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup
uses: ./.github/actions/setup

- name: Lint files
run: yarn lint

- name: Typecheck files
run: yarn typecheck

- name: Run unit tests
run: yarn test --maxWorkers=2 --coverage

- name: Build package
run: yarn prepare

- name: Release
run: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPMJS_TOKEN }}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# dotlottie-react-native
# dotLottie React Native

dotlottie react native
Lottie & dotLottie component for React Native ([iOS](https://github.com/LottieFiles/dotlottie-ios/) and [Android](https://github.com/LottieFiles/dotlottie-android/))

## Installation

```sh
npm install dotlottie-react-native
npm install @lottiefiles/dotlottie-react-native
```

## Usage

```ts
import { Button, StyleSheet, View } from 'react-native';
import { DotLottie, Mode, type Dotlottie } from 'dotlottie-react-native';
import { DotLottie, Mode, type Dotlottie } from '@lottiefiles/dotlottie-react-native';
import { useRef } from 'react';

export default function App() {
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "dotlottie-react-native",
"name": "@lottiefiles/dotlottie-react-native",
"version": "0.1.0",
"description": "dotlottie react native",
"source": "./src/index.tsx",
Expand Down Expand Up @@ -47,7 +47,11 @@
"keywords": [
"react-native",
"ios",
"android"
"android",
"lottie",
"dotlottie",
"player",
"animation"
],
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/DotLottie.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import type { Mode } from './constants';
import { parseSource } from './utils';

const LINKING_ERROR =
`The package 'dotlottie-react-native' doesn't seem to be linked. Make sure: \n\n` +
`The package '@lottiefiles/dotlottie-react-native' doesn't seem to be linked. Make sure: \n\n` +
Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
'- You rebuilt the app after installing the package\n' +
'- You are not using Expo Go\n';
Expand Down
58 changes: 29 additions & 29 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2371,6 +2371,35 @@ __metadata:
languageName: node
linkType: hard

"@lottiefiles/dotlottie-react-native@workspace:.":
version: 0.0.0-use.local
resolution: "@lottiefiles/dotlottie-react-native@workspace:."
dependencies:
"@commitlint/config-conventional": ^17.0.2
"@evilmartians/lefthook": ^1.5.0
"@react-native/eslint-config": ^0.73.1
"@release-it/conventional-changelog": ^5.0.0
"@types/jest": ^29.5.5
"@types/react": ^18.2.44
commitlint: ^17.0.2
del-cli: ^5.1.0
eslint: ^8.51.0
eslint-config-prettier: ^9.0.0
eslint-plugin-prettier: ^5.0.1
jest: ^29.7.0
prettier: ^3.0.3
react: 18.2.0
react-native: 0.74.5
react-native-builder-bob: ^0.29.0
release-it: ^15.0.0
turbo: ^1.10.7
typescript: ^5.2.2
peerDependencies:
react: "*"
react-native: "*"
languageName: unknown
linkType: soft

"@nicolo-ribaudo/eslint-scope-5-internals@npm:5.1.1-v1":
version: 5.1.1-v1
resolution: "@nicolo-ribaudo/eslint-scope-5-internals@npm:5.1.1-v1"
Expand Down Expand Up @@ -5523,35 +5552,6 @@ __metadata:
languageName: unknown
linkType: soft

"dotlottie-react-native@workspace:.":
version: 0.0.0-use.local
resolution: "dotlottie-react-native@workspace:."
dependencies:
"@commitlint/config-conventional": ^17.0.2
"@evilmartians/lefthook": ^1.5.0
"@react-native/eslint-config": ^0.73.1
"@release-it/conventional-changelog": ^5.0.0
"@types/jest": ^29.5.5
"@types/react": ^18.2.44
commitlint: ^17.0.2
del-cli: ^5.1.0
eslint: ^8.51.0
eslint-config-prettier: ^9.0.0
eslint-plugin-prettier: ^5.0.1
jest: ^29.7.0
prettier: ^3.0.3
react: 18.2.0
react-native: 0.74.5
react-native-builder-bob: ^0.29.0
release-it: ^15.0.0
turbo: ^1.10.7
typescript: ^5.2.2
peerDependencies:
react: "*"
react-native: "*"
languageName: unknown
linkType: soft

"eastasianwidth@npm:^0.2.0":
version: 0.2.0
resolution: "eastasianwidth@npm:0.2.0"
Expand Down

0 comments on commit 5eb6291

Please sign in to comment.