Skip to content

Commit

Permalink
chore: update deps... & fix typescript types
Browse files Browse the repository at this point in the history
Signed-off-by: Okiki <[email protected]>
  • Loading branch information
okikio committed Dec 13, 2023
1 parent 05f4ca9 commit 31830ea
Show file tree
Hide file tree
Showing 76 changed files with 3,013 additions and 7,346 deletions.
71 changes: 0 additions & 71 deletions .github/workflows/build.js.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .github/workflows/changelog.yml

This file was deleted.

78 changes: 43 additions & 35 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,52 +5,60 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
if: "!contains(github.event.head_commit.message, '[skip ci]')"
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
packages: write # to be able to publish a GitHub package
id-token: write

steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Cache .pnpm-store
uses: actions/cache@v1
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
# File containing the version Spec of the version to use. Examples: .nvmrc, .node-version, .tool-versions.
node-version-file: '.nvmrc' # optional

- name: Install pnpm
run: curl -f https://get.pnpm.io/v6.js | node - add --global pnpm@6
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
# Version of pnpm to install
version: latest # optional
# If specified, run `pnpm install`
run_install: true # optional, default is null

- name: Install dependencies
run: pnpm install
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Build
run: pnpm pre-release

- name: Release
run: pnpm semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm semantic-release

- name: Commit files
if: ${{ github.ref == 'refs/heads/main' }}
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "chore(gh-bot): :rocket: release" -a
- name: Push changes
if: ${{ github.ref == 'refs/heads/main' }}
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GH_TOKEN }}
branch: ${{ github.ref }}
# - name: Push changes
# if: ${{ github.ref == 'refs/heads/main' }}
# uses: ad-m/github-push-action@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# branch: ${{ github.ref }}
64 changes: 64 additions & 0 deletions .github/workflows/test-and-benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Test & Benchmark CI

on:
push:
branches: [main]
paths:
- '*.ts'
- '*.js'
- '*.json'
- '*.jsonc'
- '*.yaml'
- '.github/**/test-and-benchmark.yml'
- '.typedoc/**/*'
- 'media/**/*'
- 'tests/**/*'
- 'scripts/**/*'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
permissions:
contents: read

steps:
- uses: actions/checkout@v3
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
# File containing the version Spec of the version to use. Examples: .nvmrc, .node-version, .tool-versions.
node-version-file: '.nvmrc' # optional

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
# Version of pnpm to install
version: latest # optional
# If specified, run `pnpm install`
run_install: false # optional, default is null

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Build
run: pnpm pre-release
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,26 @@ dist
/lib
/docs
/@types

# build output
dist/
docs/

# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# environment variables
.env
.env.production

# macOS-specific files
.DS_Store
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm commitlint "$1"
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
21
8 changes: 8 additions & 0 deletions .typedoc/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"skipLibCheck": true,
"jsxFactory": "JSX.createElement",
"jsxFragmentFactory": "JSX.Fragment"
},
}
Loading

0 comments on commit 31830ea

Please sign in to comment.