Skip to content

Commit 3040bdb

Browse files
authored
Added GitHub Actions config (#218)
* Added GitHub Actions config * Slight wording adjustment in README
1 parent b13c0b2 commit 3040bdb

File tree

3 files changed

+29
-10
lines changed

3 files changed

+29
-10
lines changed

.github/workflows/npm-publish.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: npm Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
publish-npm:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v1
13+
with:
14+
node-version: 14
15+
registry-url: https://registry.npmjs.org/
16+
- run: npm ci
17+
- run: npm --no-git-tag-version version ${{ github.event.release.tag_name }}
18+
- run: npm publish --access public
19+
env:
20+
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# :space_invader: React Native Template TypeScript
22

33
<p>
4-
<a href="https://travis-ci.org/react-native-community/react-native-template-typescript">
5-
<img alt="Build Status" src="https://img.shields.io/travis/react-native-community/react-native-template-typescript.svg" target="_blank" />
4+
<a href="https://github.com/react-native-community/react-native-template-typescript/actions/workflows/npm-publish.yml">
5+
<img alt="Build Status" src="https://github.com/react-native-community/react-native-template-typescript/actions/workflows/npm-publish.yml/badge.svg" />
66
</a>
77
<a href="https://github.com/react-native-community/react-native-template-typescript#readme">
8-
<img alt="Documentation" src="https://img.shields.io/badge/documentation-yes-brightgreen.svg" target="_blank" />
8+
<img alt="Documentation" src="https://img.shields.io/badge/documentation-yes-brightgreen.svg" />
99
</a>
1010
<a href="https://github.com/react-native-community/react-native-template-typescript/graphs/commit-activity">
11-
<img alt="Maintenance" src="https://img.shields.io/badge/Maintained%3F-yes-green.svg" target="_blank" />
11+
<img alt="Maintenance" src="https://img.shields.io/badge/Maintained%3F-yes-green.svg" />
1212
</a>
1313
<a href="https://github.com/react-native-community/react-native-template-typescript/blob/master/LICENSE">
14-
<img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" target="_blank" />
14+
<img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" />
1515
</a>
1616
</p>
1717

@@ -52,12 +52,12 @@ See the below table to find out which version of the template to use.
5252

5353
## :warning: React Native CLI
5454

55-
This template only works with the new CLI. Make sure you have uninstalled the legacy `react-native-cli` first (`npm uninstall -g react-native-cli`), for the below command to work. If you wish to not use `npx`, you can also install the new CLI globally (`npm i -g @react-native-community/cli` or `yarn global add @react-native-community/cli`).
56-
57-
If you tried the above and still get the *react-native-template-react- native-template-typescript: Not found error*, please try adding the [--ignore-existing](https://github.com/npm/npx#description) flag to the npx call to force npx to ignore any locally installed versions of the CLI.
55+
This template only works with the new CLI. Make sure you have uninstalled the legacy `react-native-cli` first (`npm uninstall -g react-native-cli`) for the below command to work. If you wish to not use `npx`, you can also install the new CLI globally (`npm i -g @react-native-community/cli` or `yarn global add @react-native-community/cli`).
5856

57+
If you tried the above and still get the react-native-template-react- native-template-typescript: Not found error, please try adding the `--ignore-existing` flag to [force npx to ignore](https://github.com/npm/npx#description) any locally installed versions of the CLI and use the latest.
5958

6059
Further information can be found here: https://github.com/react-native-community/cli#about
60+
6161
## :computer: Contributing
6262

6363
Contributions are very welcome. Please check out the [contributing document](CONTRIBUTING.md).

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"version": "0.0.1",
44
"description": "Clean and minimalist React Native template for a quick start with TypeScript.",
55
"scripts": {
6-
"test": "exit 0",
7-
"prepublishOnly": "npm --no-git-tag-version version $TRAVIS_TAG"
6+
"test": "exit 0"
87
},
98
"files": [
109
"template",

0 commit comments

Comments
 (0)