Skip to content

Commit

Permalink
Merge pull request #1 from gronda-team/feature/package
Browse files Browse the repository at this point in the history
add github package action
  • Loading branch information
Anderson Andrade authored Apr 2, 2022
2 parents 358cec3 + bfbf018 commit a5cb265
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 8 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/npm-publish-github-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release NPM Package
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
registry-url: https://npm.pkg.github.com/
scope: "@gronda-team"
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{secrets.PACKAGE_WRITER_GITHUB_TOKEN}}
- run: npm test
publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
registry-url: https://npm.pkg.github.com/
scope: "@gronda-team"
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{secrets.PACKAGE_WRITER_GITHUB_TOKEN}}
- run: npm --no-git-tag-version version $RELEASE_TAG_NAME
env:
RELEASE_TAG_NAME: ${{ github.event.release.tag_name }}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.PACKAGE_WRITER_GITHUB_TOKEN}}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@gronda-team:registry=https://npm.pkg.github.com
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
{
"name": "react-native-picker-scrollview",
"name": "@gronda-team/react-native-picker-scrollview",
"version": "0.1.0",
"description": "a pure js picker, each option item customizable",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/veizz/react-native-picker-scrollview.git"
"url": "https://github.com/gronda-team/react-native-picker-scrollview.git"
},
"keywords": [
"picker",
Expand All @@ -18,7 +17,10 @@
"author": "veizz",
"license": "MIT",
"bugs": {
"url": "https://github.com/veizz/react-native-picker-scrollview/issues"
"url": "https://github.com/gronda-team/react-native-picker-scrollview/issues"
},
"homepage": "https://github.com/veizz/react-native-picker-scrollview#readme"
"homepage": "https://github.com/gronda-team/react-native-picker-scrollview#readme",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ needed a fork, because despite the component is a clever solution, it was not re
### usage

```shell
npm install react-native-picker-scrollview --save
npm install @gronda-team/react-native-picker-scrollview --save
```

```jsx
import React, {Component} from 'react';
import ScrollPicker from 'react-native-picker-scrollview';
import ScrollPicker from '@gronda-team/react-native-picker-scrollview';

export default class SimpleExample extends Component {

Expand Down

0 comments on commit a5cb265

Please sign in to comment.