Skip to content

Commit

Permalink
feat: automatically publish to npm (#11)
Browse files Browse the repository at this point in the history
- Fixes #10
  • Loading branch information
styfle committed Jan 7, 2023
1 parent 8b14980 commit e0031d4
Show file tree
Hide file tree
Showing 7 changed files with 627 additions and 1,674 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
env:
FORCE_COLOR: 2

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
test:
name: Node.js ${{ matrix.node }} on ${{ matrix.os }}
Expand All @@ -35,3 +39,9 @@ jobs:
- run: pnpm test
- run: pnpm lint:eslint
- run: pnpm lint:prettier
- name: Maybe Release
if: matrix.os == 'ubuntu-latest' && matrix.node == 18 && github.event_name == 'push' && github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm dlx semantic-release@19.0.5
14 changes: 14 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: PR
on:
pull_request:
types: [opened, edited, synchronize]
pull_request_target:
types: [opened, edited, synchronize]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@0b14f54ac155d88e12522156e52cb6e397745cfd
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .lintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pnpm-lock.yaml
node_modules
.tsbuildinfo
dist
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "links-awakening",
"version": "0.0.2",
"version": "0.0.0-development",
"description": "Recursively check a website for broken links",
"type": "module",
"main": "dist/index.js",
Expand All @@ -12,8 +12,8 @@
],
"scripts": {
"build": "tsc",
"lint:eslint": "eslint \"**/*.{js,jsx,ts,tsx}\" --ignore-path \".gitignore\"",
"lint:prettier": "prettier \".\" --check --ignore-path \".gitignore\"",
"lint:eslint": "eslint \"**/*.{js,jsx,ts,tsx}\" --ignore-path \".lintignore\"",
"lint:prettier": "prettier \".\" --check --ignore-path \".lintignore\"",
"test": "node --test test/"
},
"prettier": "@vercel/style-guide/prettier",
Expand Down

0 comments on commit e0031d4

Please sign in to comment.