Skip to content

Commit

Permalink
Fresh start
Browse files Browse the repository at this point in the history
  • Loading branch information
cb1kenobi committed May 29, 2024
1 parent b5f1c99 commit 5ea9deb
Show file tree
Hide file tree
Showing 49 changed files with 328 additions and 10,355 deletions.
14 changes: 0 additions & 14 deletions .editorconfig

This file was deleted.

5 changes: 0 additions & 5 deletions .eslintrc

This file was deleted.

44 changes: 44 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# .gitattributes snippet to force users to use same line endings for project.
#
# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text=auto


# These files are text and should be normalized (Convert crlf => lf)
*.php text
*.css text
*.js text eol=lf
*.json text
*.htm text
*.html text
*.xml text
*.txt text
*.ini text
*.inc text
*.pl text
*.rb text
*.py text
*.scm text
*.sql text
.htaccess text
*.sh text

# These files are binary and should be left untouched
# (binary is a macro for -text -diff)
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.mov binary
*.mp4 binary
*.mp3 binary
*.flv binary
*.fla binary
*.swf binary
*.gz binary
*.zip binary
*.7z binary
*.ttf binary
*.pyc binary
28 changes: 18 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Publish
on:
release:
types: [ created ]
types: [published]

jobs:
publish:
Expand All @@ -10,22 +10,30 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org/'

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org'
version: latest

- name: Install dependencies
run: npm ci
if: steps.node-cache.outputs.cache-hit != 'true'
run: pnpm install

- name: Lint
run: pnpm lint

- name: Publish to npm
env:
GH_TOKEN: ${{ github.token }}
GITHUB_TOKEN: ${{ github.token }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
RELEASE_TAG: ${{ github.event.release.prerelease && 'next' || 'latest' }}
run: npm publish --tag $RELEASE_TAG
38 changes: 38 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Tests

on: [push, pull_request]

jobs:
test:
name: Test on node ${{ matrix.node }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node: [18, 20, 22]
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
- name: Checkout repository
uses: actions/checkout@v4

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

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest

- name: Install dependencies
run: pnpm install

- name: Lint
run: pnpm lint

- name: Run tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm coverage
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
._*
.DS_Store*
.nyc_output
/coverage
/dist
/docs
junit.xml
node_modules
npm-debug.log
yarn-error.log
.pnpm-debug.log
19 changes: 0 additions & 19 deletions .npmignore

This file was deleted.

6 changes: 0 additions & 6 deletions Jenkinsfile

This file was deleted.

Loading

0 comments on commit 5ea9deb

Please sign in to comment.