From 677a1aa85bfbd5bbf842aab37e2f9ef47a214eff Mon Sep 17 00:00:00 2001 From: "Dr. Vortex" Date: Wed, 29 May 2024 12:44:51 -0500 Subject: [PATCH] Use core Github workflows and package.json `files` instead of .npmignore --- .github/workflows/ci.yaml | 68 +--------------------------------- .github/workflows/release.yaml | 29 +++------------ .npmignore | 1 - package.json | 6 +++ 4 files changed, 13 insertions(+), 91 deletions(-) delete mode 100644 .npmignore diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3ebcb60..94dd28f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,72 +10,8 @@ on: jobs: ci: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - name: ${{ matrix.os }} + name: CI + uses: zen-fs/core/.github/workflows/ci.yaml@main permissions: contents: read id-token: write - defaults: - run: - shell: bash - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: 18 - - - name: Install dependencies - run: npm install - - - name: Formatting - run: npm run format:check - - - name: Linting - run: npm run lint - - - name: Unit tests - run: npm run test - - - name: Build - run: npm run build - docs: - needs: ci - runs-on: ubuntu-latest - name: Docs build and deploy - permissions: - contents: write - id-token: write - pages: write - environment: - name: github-pages - url: ${{ steps.deploy.outputs.page_url }} - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: 18 - - - name: Install dependencies - run: npm install - - - name: Build docs - run: npm run build:docs - - - name: Upload docs artifact - uses: actions/upload-pages-artifact@v3 - if: github.event_name != 'pull_request' - with: - path: ./docs - - name: 'Deploy docs' - id: deploy - if: github.event_name != 'pull_request' - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c13b2b6..3d3d45c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,30 +6,11 @@ on: jobs: ci: - uses: ./.github/workflows/ci.yaml + name: CI + uses: zen-fs/core/.github/workflows/ci.yaml@main permissions: - contents: write + contents: read id-token: write - pages: write release: - runs-on: ubuntu-latest - needs: ci - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup npm authenication - uses: actions/setup-node@v3 - with: - registry-url: https://registry.npmjs.org/ - - - name: Install dependencies - run: npm install - - - name: Build - run: npm run build - - - name: Publish - run: npm publish --access=public - env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} + name: Release + uses: zen-fs/core/.github/workflows/release.yaml@main diff --git a/.npmignore b/.npmignore deleted file mode 100644 index ca3f2db..0000000 --- a/.npmignore +++ /dev/null @@ -1 +0,0 @@ -!tsconfig.json diff --git a/package.json b/package.json index 2d633b8..d09c858 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,12 @@ ".": "./dist/index.js", "./*": "./dist/*" }, + "files": [ + "dist", + "src", + "license.md", + "tsconfig.json" + ], "scripts": { "format": "prettier --write .", "format:check": "prettier --check .",