Skip to content

Commit 09d908b

Browse files
authored
feat: add publish kitten-tricks to expo action
1 parent 56fd784 commit 09d908b

3 files changed

Lines changed: 206 additions & 142 deletions

File tree

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Kitten Tricks - Expo Preview
2+
on: [pull_request]
3+
4+
jobs:
5+
publish:
6+
name: Install and publish
7+
runs-on: ubuntu-latest
8+
if: github.event.pull_request.head.repo.full_name == 'akveo/react-native-ui-kitten'
9+
steps:
10+
- name: Checkout UI Kitten
11+
uses: actions/checkout@v2
12+
13+
- name: Exclude unused modules
14+
run: rm -rf docs src/showcases src/template-js src/template-ts
15+
16+
- name: Checkout Eva
17+
uses: actions/checkout@v2
18+
with:
19+
repository: eva-design/eva
20+
ref: next
21+
path: ./packages-ci/eva
22+
23+
- name: Checkout Kitten Tricks
24+
uses: actions/checkout@v2
25+
with:
26+
repository: akveo/kittenTricks
27+
ref: next
28+
path: ./packages-ci/kittenTricks
29+
30+
- name: Setup Node
31+
uses: actions/setup-node@v1
32+
33+
- name: Setup Expo
34+
uses: expo/expo-github-action@v5
35+
with:
36+
expo-version: 3.x
37+
expo-username: ${{ secrets.EXPO_CLI_USERNAME_UI_KITTEN }}
38+
expo-password: ${{ secrets.EXPO_CLI_PASSWORD_UI_KITTEN }}
39+
expo-cache: true
40+
41+
- name: Get yarn cache
42+
id: yarn-cache
43+
run: echo "::set-output name=dir::$(yarn cache dir)"
44+
45+
- name: Check yarn cache
46+
uses: actions/cache@v1
47+
with:
48+
path: ${{ steps.yarn-cache.outputs.dir }}
49+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
50+
restore-keys: |
51+
${{ runner.os }}-yarn-
52+
53+
- name: Install UI Kitten dependencies
54+
run: yarn
55+
56+
- name: Install Kitten Tricks dependencies
57+
working-directory: ./packages-ci/kittenTricks
58+
run: yarn
59+
60+
- name: Switch Kitten Tricks environment
61+
working-directory: ./packages-ci/kittenTricks
62+
run: yarn env ci-ui-kitten
63+
64+
- name: Publish Expo App
65+
working-directory: ./packages-ci/kittenTricks
66+
run: expo publish --release-channel=pr-ui-kitten-${{ github.event.number }}
67+
68+
- name: Build Web App
69+
working-directory: ./packages-ci/kittenTricks
70+
run: yarn build:web
71+
72+
- name: Deploy Web App to Netlify
73+
uses: netlify/actions/cli@master
74+
env:
75+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
76+
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
77+
with:
78+
args: deploy --dir=./packages-ci/kittenTricks/web-build --message=pr-ui-kitten-${{ github.event.number }}
79+
secrets: '["NETLIFY_AUTH_TOKEN", "NETLIFY_SITE_ID"]'
80+
81+
- name: Get Expo App link
82+
id: expo
83+
run: echo "::set-output name=path::@ui-kitten/kitten-tricks?release-channel=pr-ui-kitten-${{ github.event.number }}"
84+
85+
- name: Comment on PR
86+
uses: unsplash/comment-on-pr@master
87+
env:
88+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
89+
with:
90+
msg: Try running it with [Kitten Tricks](https://expo.io/${{ steps.expo.outputs.path }})<br><br><a href="https://exp.host/${{ steps.expo.outputs.path }}"><img src="https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=exp://exp.host/${{ steps.expo.outputs.path }}" height="200px" width="200px"></a>.

CONTRIBUTING.md

Lines changed: 55 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22

33
We would love for you to contribute to UI Kitten and help make it even better together! :rocket:
44

5-
- [Code of Conduct](#coc)
6-
- [Question or Problem?](#question)
7-
- [Issues and Bugs](#issue)
8-
- [Feature Requests](#feature)
9-
- [Submission Guidelines](#submit-pr)
10-
- [Coding Rules](#rules)
11-
- [Run Demo Application](#run)
12-
- [Debugging your changes](#debug)
13-
- [Commit Message Guidelines](#commit)
5+
- [Code of Conduct](#code-of-conduct)
6+
- [Question or Problem?](#got-a-question-or-problem)
7+
- [Issues and Bugs](#found-an-issue)
8+
- [Feature Requests](#want-a-feature)
9+
- [Submission Guidelines](#submitting-an-issue)
10+
- [Coding Rules](#coding-rules)
11+
- [Debugging your changes](#debugging-your-changes)
12+
- [Commit Message Guidelines](#commit-message-guidelines)
1413

15-
## <a name="coc"></a> Code of Conduct
16-
Help us keep UI Kitten open and inclusive. Please read and follow our [Code of Conduct][coc].
14+
## Code of Conduct
1715

18-
## <a name="question"></a> Got a Question or Problem?
16+
Help us keep UI Kitten open and inclusive. Please read and follow our [Code of Conduct](./CODE_OF_CONDUCT.md).
1917

20-
Please do not open issues for general support questions as we want to keep GitHub issues for bug reports and feature requests. You've got much better chances of getting your question answered on [StackOverflow][stackoverflow] where the questions should be tagged with tag `react-native-ui-kitten`.
18+
## Got a Question or Problem?
19+
20+
Please do not open issues for general support questions as we want to keep GitHub issues for bug reports and feature requests. You've got much better chances of getting your question answered on [StackOverflow](https://stackoverflow.com/search?q=ui-kitten) where the questions should be tagged with tag `ui-kitten`.
2121

2222
StackOverflow is a much better place to ask questions since:
2323

@@ -27,54 +27,62 @@ StackOverflow is a much better place to ask questions since:
2727

2828
To save your and our time, we will be systematically closing all the issues that are requests for general support and redirecting people to StackOverflow.
2929

30+
## Found an Issue?
3031

31-
## <a name="issue"></a> Found an Issue?
32-
If you find a bug in the source code or a mistake in the documentation, you can help us by [submitting an issue](#submit-issue) to our [GitHub Repository][github]. Including an issue, reproduction is the absolute best way to help the team quickly diagnose the problem. Screenshots and error stack traces are also helpful.
32+
If you find a bug in the source code or a mistake in the documentation, you can help us by [submitting an issue](#submitting-an-issue) to our [GitHub Repository](https://github.com/akveo/react-native-ui-kitten/issues/new/choose). Including an issue, reproduction is the absolute best way to help the team quickly diagnose the problem. Screenshots and error stack traces are also helpful.
3333

3434
Please follow this simple checklist before submitting:
3535

36-
* If you have a question about using UI Kitten, please ask on the [StackOverflow][stackoverflow].
36+
* If you have a question about using UI Kitten, please ask on the [StackOverflow](https://stackoverflow.com/search?q=ui-kitten).
3737

3838
* It is required that you clearly describe the steps necessary to reproduce the issue you are running into. Although we would love to help our users as much as possible, diagnosing issues without clear reproduction steps is extremely time-consuming and simply not sustainable.
3939

4040
* The issue list of this repository is exclusively for bug reports and feature requests. Non-conforming issues will be closed immediately.
4141

4242
* Issues with no clear steps to reproduce will not be triaged. If an issue is labeled with "needs info" and receives no further replies from the author of the issue for more than 5 days, it will be closed.
4343

44-
* If you think you have found a bug, or have a new feature idea, please start by making sure it hasn't already been [reported][issues]. You can search through existing issues to see if there is a similar one reported. Include closed issues as it may have been closed with a solution.
44+
* If you think you have found a bug, or have a new feature idea, please start by making sure it hasn't already been [reported](https://github.com/akveo/react-native-ui-kitten/issues). You can search through existing issues to see if there is a similar one reported. Include closed issues as it may have been closed with a solution.
45+
46+
* Next, [create a new issue](#submitting-an-issue) that thoroughly explains the problem. Please fill out the populated issue form before submitting the issue.
4547

46-
* Next, [create a new issue](#submit-issue) that thoroughly explains the problem. Please fill out the populated issue form before submitting the issue.
48+
## Want a Feature?
4749

48-
## <a name="feature"></a> Want a Feature?
49-
You can *request* a new feature by [submitting an issue](#submit-issue) to our [GitHub Repository][github]. If you would like to *implement* a new feature, please submit an issue with a proposal for your work first, to be sure that we can use it. Please consider what kind of change it is:
50+
You can *request* a new feature by [submitting an issue](https://github.com/akveo/react-native-ui-kitten/issues/new/choose) to our GitHub Repository. If you would like to *implement* a new feature, please submit an issue with a proposal for your work first, to be sure that we can use it. Please consider what kind of change it is:
51+
52+
* **Small Features** can be crafted and directly [submitted as a Pull Request](#submitting-a-pull-request-pr).
5053

5154
* For a **Major Feature**, first open an issue and outline your proposal so that it can be
5255
discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
5356
and help you to craft the change so that it is successfully accepted into the project.
54-
* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
55-
56-
### <a name="submit-issue"></a> Submitting an Issue Before you submit an issue, search the archive, maybe your question was already answered.
5757

58-
If your issue appears to be a bug and hasn't been reported, open a new issue. Help us to maximize the effort we can spend fixing issues and adding new features by not reporting duplicate issues. Please make sure to fill out the populated issue form before submitting the issue.
58+
### Submitting an Issue
59+
60+
Before you submit an issue, search the archive, maybe your question was already answered.
5961

60-
You can file new issues by providing the information [here][new_issue].
62+
If your issue appears to be a bug and hasn't been reported, [open a new issue](https://github.com/akveo/react-native-ui-kitten/issues/new/choose). Help us to maximize the effort we can spend fixing issues and adding new features by not reporting duplicate issues. Please make sure to fill out the populated issue form before submitting the issue.
6163

64+
### Submitting a Pull Request (PR)
6265

63-
### <a name="submit-pr"></a> Submitting a Pull Request (PR)
6466
Before you submit your Pull Request (PR) consider the following guidelines:
6567

66-
* Search [GitHub][pulls] for an open or closed PR
68+
* Search [GitHub](https://github.com/akveo/react-native-ui-kitten/pulls) for an open or closed PR
6769
that relates to your submission. You don't want to duplicate effort.
70+
6871
* Make your changes in a new git branch:
6972

70-
```shell
71-
git checkout -b my-fix-branch master
72-
```
73-
* Read the [developer documentation][dev-doc].
73+
```shell
74+
git checkout -b fix/my-fix-branch master
75+
```
76+
77+
* Read the [developer documentation](./DEV_DOCS.md).
78+
7479
* Create your patch, **including appropriate test cases**.
75-
* Follow our [Coding Rules](#rules).
80+
81+
* Follow our [Coding Rules](#coding-rules).
82+
7683
* Test your changes.
77-
* Commit your changes using a descriptive commit message that follows our [commit message conventions](#commit). Adherence to these conventions is necessary because release notes are automatically generated from these messages.
84+
85+
* Commit your changes using a descriptive commit message that follows our [commit message conventions](#commit-message-guidelines). Adherence to these conventions is necessary because release notes are automatically generated from these messages.
7886

7987
```shell
8088
git commit -a
@@ -88,8 +96,11 @@ Before you submit your Pull Request (PR) consider the following guidelines:
8896
```
8997

9098
* In GitHub, send a pull request to `master`.
99+
91100
* If we suggest changes then:
101+
92102
* Make the required updates.
103+
93104
* Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
94105

95106
```shell
@@ -129,42 +140,18 @@ from the main (upstream) repository:
129140
git pull --ff upstream master
130141
```
131142
132-
## <a name="rules"></a> Coding Rules
143+
## Coding Rules
144+
133145
To ensure consistency throughout the source code, keep these rules in mind as you are working:
134146
135147
* All features or bug fixes **must be tested** by one or more specs (unit-tests).
136148
* All public API methods **must be documented** following JsDoc notation.
137149
138-
## <a name="run"></a> Run Demo Application
150+
## Debugging your changes
139151
140-
UI Kitten has [Demo Application](https://github.com/akveo/kittenTricks) which allows you to debug quickly your changes.
141-
To run it you should:
142-
* Clone UI Kitten project
143-
* Clone Kitten Tricks project
144-
* Clone Eva Design System project
145-
* Go to project root directory:
146-
```
147-
cd ./path-to/react-native-ui-kitten
148-
```
149-
* Install dependencies:
150-
```
151-
yarn
152-
```
153-
* That's it! You're ready to run:
154-
```
155-
yarn demo start:dev
156-
```
157-
* Now you will be prompted by CLI to select the device you'd like to run.
158-
Just follow the CLI instructions. Normally you should hit `a` or `i` button
159-
to make Android or iOS device running.
160-
161-
## <a name="debug"></a> Debugging your changes
162-
163-
If you're done with running Kitten Tricks on Android emulator or iOS simulator,
164-
you can observe all the changes you do inside [components module](src/components)
165-
on the device you have started. That's where hot/live reload takes place.
152+
See [developer documentation](./DEV_DOCS.md#start-a-demo-application) for this step.
166153
167-
## <a name="commit"></a> Commit Message Guidelines
154+
## Commit Message Guidelines
168155
169156
We have very precise rules over how our git commit messages can be formatted. This leads to **more
170157
readable messages** that are easy to follow when looking through the **project history**. But also,
@@ -188,11 +175,13 @@ Any line of the commit message cannot be longer 100 characters! This allows the
188175
to read on GitHub as well as in various git tools.
189176
190177
### Revert
178+
191179
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of
192180
the reverted commit. In the body, it should say: `These reverts commit <hash>.`, where the hash is
193181
the SHA of the commit being reverted.
194182
195183
### Type
184+
196185
Must be one of the following:
197186
198187
* **feat**: A new feature
@@ -209,6 +198,7 @@ Must be one of the following:
209198
* **release**: Release version commit
210199

211200
### Scope
201+
212202
* For [components ui module](src/components/ui) the scope should be the name of the component that was affected:
213203
```
214204
style(button): add styles for pressed state
@@ -219,27 +209,22 @@ feat(date-fns): description of awesome feature
219209
```
220210

221211
### Subject
212+
222213
The subject contains a succinct description of the change:
223214

224215
* use the imperative, present tense: "change" not "changed" nor "changes"
225216
* don't capitalize the first letter
226217
* no dot (.) at the end
227218
228219
### Body
220+
229221
Optional. Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
230222
The body should include the motivation for the change and contrast this with previous behavior.
231223
232224
### Footer
225+
233226
Optional. The footer should contain any information about **Breaking Changes** and is also the place to
234227
reference GitHub issues that this commit **Closes**.
235228
236229
**Breaking Changes** should start with the word `BREAKING CHANGE:` with space or two newlines.
237230
The rest of the commit message is then used for this.
238-
239-
[coc]: CODE_OF_CONDUCT.md
240-
[dev-doc]: DEV_DOCS.md
241-
[github]: https://github.com/akveo/react-native-ui-kitten
242-
[stackoverflow]: https://stackoverflow.com/questions/tagged/react-native-ui-kitten
243-
[issues]: https://github.com/akveo/react-native-ui-kitten/issues
244-
[new_issue]: https://github.com/akveo/react-native-ui-kitten/issues/new
245-
[pulls]: https://github.com/akveo/react-native-ui-kitten/pulls

0 commit comments

Comments
 (0)