diff --git a/.github/npm-publish.yml b/.github/npm-publish.yml new file mode 100644 index 0000000..7664741 --- /dev/null +++ b/.github/npm-publish.yml @@ -0,0 +1,23 @@ +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages + +name: Publish to npm + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + - run: pnpm i + - run: pnpm run lint + - run: pnpm run build:lib + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} diff --git a/package.json b/package.json index b1187ca..ad4c559 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-mobile-picker", - "version": "1.0.0", + "version": "1.0.0-alpha.1", "description": "An iOS like select box component for React", "type": "module", "files": [