Skip to content

Commit

Permalink
refactor: cleanup (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
wadjih-bencheikh18 authored Mar 1, 2022
1 parent 57e04d4 commit a8ec781
Show file tree
Hide file tree
Showing 29 changed files with 27 additions and 2,631 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/documentationjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
- name: Build documentation
uses: zakodium/documentationjs-action@v1
- name: Deploy to GitHub pages
uses: JamesIves/github-pages-deploy-action@releases/v3
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
BRANCH: gh-pages
FOLDER: docs
CLEAN: true
token: ${{ secrets.BOT_TOKEN }}
branch: gh-pages
folder: docs
clean: true
45 changes: 8 additions & 37 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,14 @@ name: Node.js CI

on:
push:
branches: master
branches:
- master
pull_request:

env:
NODE_VERSION: 16.x

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: npm install
- name: Run ESLint
run: npm run eslint
- name: Run Prettier
run: npm run prettier
- name: Check types
run: npm run check-types
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Run tests
run: npm run test-coverage
- name: Send coverage report to Codecov
uses: codecov/codecov-action@v2
nodejs:
# Documentation: https://github.com/zakodium/workflows#nodejs-ci
uses: zakodium/workflows/.github/workflows/nodejs.yml@nodejs-v1
with:
node-version-matrix: '[12, 14, 16]'
lint-check-types: true
37 changes: 8 additions & 29 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,12 @@ on:
branches:
- master

env:
NODE_VERSION: 14.x

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: Get package name
run: echo "PACKAGE_NAME=$(jq .name package.json | tr -d '"')" >> $GITHUB_ENV
- uses: GoogleCloudPlatform/release-please-action@v2
id: release
with:
token: ${{ secrets.BOT_TOKEN }}
release-type: node
package-name: ${{ env.PACKAGE_NAME }}
bump-minor-pre-major: Yes
- uses: actions/checkout@v2
# These if statements ensure that a publication only occurs when a new release is created
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}
- run: npm install
if: ${{ steps.release.outputs.release_created }}
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_BOT_TOKEN }}
if: ${{ steps.release.outputs.release_created }}
release:
# Documentation: https://github.com/zakodium/workflows#release
uses: zakodium/workflows/.github/workflows/release.yml@release-v1
with:
npm: true
secrets:
github-token: ${{ secrets.BOT_TOKEN }}
npm-token: ${{ secrets.NPM_BOT_TOKEN }}
Loading

0 comments on commit a8ec781

Please sign in to comment.