diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index a7ef653..71c9ff2 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -4,17 +4,8 @@ name: Node.js Package on: - push: - branches: - - main - tags-ignore: - - '**' - paths-ignore: - - '**/*.md' - - LICENSE - - '**/*.gitignore' - - .editorconfig - - apps/** + release: + types: [published] jobs: publish-npm: @@ -29,8 +20,11 @@ jobs: with: version: 7.29.1 run_install: true - - run: cd packages/react-rough-fiber && pnpm release + - name: Test + run: pnpm test + - name: Build + run: cd packages/react-rough-fiber && node scripts/npm.js && pnpm build - name: Publish - run: cd packages/react-rough-fiber && ls + run: cd packages/react-rough-fiber && npm publish --access public env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 7228509..3175a4c 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -10,19 +10,11 @@ jobs: steps: - uses: actions/checkout@v3 - - name: setup node - uses: actions/setup-node@v3 + - uses: actions/setup-node@v3 with: - node-version: "14" - - - name: Cache pnpm modules - uses: actions/cache@v2 - with: - path: ~/.pnpm-store - key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}- - - uses: pnpm/action-setup@v2.1.0 + node-version: 16 + registry-url: https://registry.npmjs.org/ + - uses: pnpm/action-setup@v2 with: version: 7.29.1 run_install: true diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..e69de29 diff --git a/packages/react-rough-fiber/package.json b/packages/react-rough-fiber/package.json index 329e792..470eb79 100644 --- a/packages/react-rough-fiber/package.json +++ b/packages/react-rough-fiber/package.json @@ -1,13 +1,12 @@ { "name": "react-rough-fiber", - "version": "0.0.1-alpha1", + "version": "0.0.2", "main": "./src/index.tsx", "license": "MIT", "scripts": { "lint": "eslint *.ts*", "test": "jest --config jest.config.js --no-cache", - "build": "rm -rf dist && tsup", - "release": "node scripts/npm.js && npm run build" + "build": "rm -rf dist && tsup" }, "devDependencies": { "@babel/core": "^7.0.0",