Skip to content

Commit

Permalink
feat: update dependencies and configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
Swiftwork committed Jun 3, 2024
1 parent bbf59ef commit 370ce13
Show file tree
Hide file tree
Showing 35 changed files with 13,398 additions and 17,041 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true

[*.{js,ts,jsx,tsx,html,css,json,yml,yaml,md}]
quote_type = single
charset = utf-8
indent_style = space
indent_size = 2
max_line_length = 120
49 changes: 0 additions & 49 deletions .eslintrc.js

This file was deleted.

116 changes: 56 additions & 60 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,56 @@
name: Continuous Delivery

on:
push:
branches:
- master
- release/*

jobs:
delivery:
name: Node 18.x
runs-on: ubuntu-latest

steps:
- name: Check out source code
uses: actions/checkout@v2-beta
with:
fetch-depth: 0

- name: Set global git user and email
run: |
git config --global user.name "GitHub Action"
git config --global user.email "[email protected]"
- name: Set up Node.js version 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: https://npm.pkg.github.com
scope: trutoo

- name: Append npm registry authentication to .npmrc
run: |
echo -e '\n//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}\n' >> ${NPM_CONFIG_USERCONFIG}
- name: Install dependencies using CI
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Used in .npmrc to install packages from github

- name: Run tests on package
run: npm test

- name: Update coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Build and publish package to GitHub Packages and GitHub Release
run: npm run release
env:
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Used to verify access through semantic release
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Used by standard npm publish
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Used for github releases through semantic release

- name: Publish package to NPM
run: npm publish --access public --@trutoo:registry=https://registry.npmjs.org
if: env.VERSION != null # Only if semantic-release publishes the package
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # Used by standard npm publish
name: Continuous Delivery

on:
push:
branches:
- main
- release/*

jobs:
delivery:
name: Node 20.x
runs-on: ubuntu-latest

steps:
- name: Check out source code
uses: actions/checkout@v2-beta
with:
fetch-depth: 0

- name: Set global git user and email
run: |
git config --global user.name "GitHub Action"
git config --global user.email "[email protected]"
- name: Set up Node.js version 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x

- name: Append npm registry authentication to .npmrc
run: |
echo -e '\n//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}\n' >> ${NPM_CONFIG_USERCONFIG}
- name: Install dependencies using CI
run: npm ci

- name: Run tests on package
run: npm test

- name: Update coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Build and publish package to GitHub Packages and GitHub Release
run: npm run release
env:
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Used to verify access through semantic release
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Used by standard npm publish
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Used for github releases through semantic release

- name: Publish package to NPM
run: npm publish --access public --@trutoo:registry=https://registry.npmjs.org
if: env.VERSION != null # Only if semantic-release publishes the package
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # Used by standard npm publish
94 changes: 45 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,45 @@
name: Continuous Integration

on:
push:
branches:
- develop
- feature/*
- release/*
- hotfix/*
- renovate/*
pull_request:
branches:
- master

jobs:
integration:
name: Node ${{ matrix.node }}
runs-on: ubuntu-latest

strategy:
matrix:
node: [16.x, 17.x, 18.x]

steps:
- name: Check out source code
uses: actions/checkout@v2-beta

- name: Set up Node.js version ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
registry-url: https://npm.pkg.github.com
scope: trutoo

- name: Install dependencies using CI
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Used in .npmrc to install packages from github

- name: Run tests on package
run: npm test

- name: Update coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Build package
run: npm run build
name: Continuous Integration

on:
push:
branches:
- develop
- feature/*
- release/*
- hotfix/*
- renovate/*
pull_request:
branches:
- main

jobs:
integration:
name: Node ${{ matrix.node }}
runs-on: ubuntu-latest

strategy:
matrix:
node: [18.x, 20.x]

steps:
- name: Check out source code
uses: actions/checkout@v2-beta

- name: Set up Node.js version ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Install dependencies using CI
run: npm ci

- name: Run tests on package
run: npm test

- name: Update coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Build package
run: npm run build
24 changes: 21 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# misc
.DS_Store
node_modules
*.log*

# dependencies
**/.yarn/*
!**/.yarn/patches
!**/.yarn/plugins
!**/.yarn/releases
!**/.yarn/sdks
!**/.yarn/versions
**/node_modules
**/.pnp
**/.pnp.*

# project
dist
coverage
act
.env.local
.env.development.local
.env.test.local
.env.production.local

# Log files
*.log*
3 changes: 0 additions & 3 deletions .npmrc

This file was deleted.

38 changes: 0 additions & 38 deletions .releaserc

This file was deleted.

8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"editorconfig.editorconfig",
"rohit-gohri.format-code-action"
]
}
Loading

0 comments on commit 370ce13

Please sign in to comment.