From e03bd428ccc70ce0c3b3f7c5b0dceeda9f948831 Mon Sep 17 00:00:00 2001 From: Adcent Date: Wed, 23 Aug 2023 14:02:12 +0800 Subject: [PATCH] add github workflow for publishing --- .github/npm-publish.yml | 23 +++++++++++++++++++++++ package.json | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 .github/npm-publish.yml 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": [