diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 535e4b7..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: CI -on: [push] -jobs: - build: - name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }} - - runs-on: ${{ matrix.os }} - strategy: - matrix: - node: ['10.x', '12.x', '14.x'] - os: [ubuntu-latest, windows-latest, macOS-latest] - - steps: - - name: Checkout repo - uses: actions/checkout@v2 - - - name: Use Node ${{ matrix.node }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node }} - - - name: Install deps and build (with cache) - uses: bahmutov/npm-install@v1 - - - name: Lint - run: yarn lint - - - name: Test - run: yarn test --ci --coverage --maxWorkers=2 - - - name: Build - run: yarn build diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..d5dfb82 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,18 @@ +name: Publish Package to npmjs +on: + release: + types: [published] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v3 + with: + node-version: '20.x' + registry-url: 'https://registry.npmjs.org' + - run: npm install && npm run build + - run: npm publish --scope=graphland --access=public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} diff --git a/package.json b/package.json index 81b3f35..3e7f99a 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "react-video-player", + "name": "@graphland/react-video-player", "author": "KingRayhan", "version": "0.1.0", "license": "MIT",