From 5f0f139d2a8e09f5ab92940346d21d8fdc0c2184 Mon Sep 17 00:00:00 2001 From: Joey Guerra Date: Sat, 30 Sep 2023 23:56:29 -0500 Subject: [PATCH] feat: Remove unnecessary files from package (#20) * feat: Remove unnecessary files from package * update pipeline --- .github/workflows/build.yml | 39 ------------------- .github/workflows/pipeline.yml | 71 ++++++++++++++++++++++++++++++++++ .gitignore | 1 + package.json | 4 ++ 4 files changed, 76 insertions(+), 39 deletions(-) delete mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/pipeline.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index d6562ad..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Build -on: - push: - branches: - - main - pull_request: - branches: - - main -permissions: - contents: read -jobs: - release: - name: Release - runs-on: ubuntu-latest - permissions: - contents: write - issues: write - pull-requests: write - id-token: write - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: "lts/*" - - name: Install Dependencies - run: npm clean-install - - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies - run: npm audit signatures - - name: Run Tests - run: npm run coverage - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: npx semantic-release diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml new file mode 100644 index 0000000..0523280 --- /dev/null +++ b/.github/workflows/pipeline.yml @@ -0,0 +1,71 @@ +name: Build and release pipeline +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] +permissions: + contents: write + issues: write + pull-requests: write + id-token: write +jobs: + build: + name: Build + runs-on: ubuntu-latest + strategy: + matrix: + node-version: ['lts/*'] + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - name: Install dependencies + run: npm ci + - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies + run: npm audit signatures + test: + name: Fast Tests + runs-on: ubuntu-latest + needs: build + strategy: + matrix: + node-version: ['lts/*'] + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm test + release: + needs: [build, test] + runs-on: ubuntu-latest + strategy: + matrix: + node-version: ['lts/*'] + if: github.ref == 'refs/heads/main' && ${{ success() }} + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npx semantic-release diff --git a/.gitignore b/.gitignore index 76b1021..f30b27b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .nyc_output coverage node_modules +.DS_Store diff --git a/package.json b/package.json index c301d2e..a22dae3 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,10 @@ "url": "https://github.com/hubotio/hubot-rules/issues" }, "main": "index.js", + "files": [ + "index.js", + "src" + ], "scripts": { "pretest": "standard", "test": "node --test",