Skip to content

Commit

Permalink
ci: update
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoban committed May 11, 2024
1 parent 6c1c624 commit 56f5889
Show file tree
Hide file tree
Showing 4 changed files with 149 additions and 4,154 deletions.
96 changes: 37 additions & 59 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,78 +10,56 @@ on:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Set node
uses: actions/setup-node@v3
with:
node-version: lts/*

- name: Setup
run: npm i -g @antfu/ni

- name: Install
run: nci

- name: Lint
run: nr lint

typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Set node
uses: actions/setup-node@v3
with:
node-version: lts/*

- name: Setup
run: npm i -g @antfu/ni

- name: Install
run: nci

- name: Typecheck
run: nr typecheck

test:
runs-on: ${{ matrix.os }}

name: Test
strategy:
matrix:
node: [lts/*]
os: [ubuntu-latest, windows-latest, macos-latest]
node: [lts/*, lts/-1]
os: [ubuntu-latest, windows-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
timeout-minutes: 10

steps:
- uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2
- uses: actions/checkout@v4

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

- name: Setup
run: npm i -g @antfu/ni
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
run_install: |
- args: [--frozen-lockfile]
- name: Install Global Packages
if: ${{ matrix.os == 'ubuntu-latest' }}
run: pnpm install -g publint @arethetypeswrong/cli

- name: Lint
if: ${{ matrix.os == 'ubuntu-latest' }}
run: pnpm run lint

- name: Install
run: nci
- name: Type check
if: ${{ matrix.os == 'ubuntu-latest' }}
run: pnpm run typecheck

- name: Build
run: nr build
run: pnpm run build

- name: Test
run: nr test
run: pnpm run test

- name: Pub Lint
if: ${{ matrix.os == 'ubuntu-latest' }}
run: publint

- name: Are The Types Wrong
if: ${{ matrix.os == 'ubuntu-latest' }}
run: attw --pack .

- name: Dedupe
if: ${{ matrix.os == 'ubuntu-latest' }}
run: pnpm dedupe --check
13 changes: 7 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,21 @@ jobs:
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Install pnpm
uses: pnpm/action-setup@v3

- name: Set node
uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: "https://registry.npmjs.org"

- name: Install
run: pnpm install --frozen-lockfile
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
run_install: |
- args: [--frozen-lockfile]
- args: [--global, release-it, release-it-pnpm]
- name: Release
run: if npx should-semantic-release ; then npx release-it --verbose ; fi
run: release-it --verbose
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
Expand Down
5 changes: 0 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"prepare": "simple-git-hooks && nr build",
"prepublishOnly": "nr build",
"release": "release-it",
"start": "esno src/index.ts",
"test": "vitest",
"typecheck": "tsc --noEmit"
},
Expand All @@ -57,12 +56,8 @@
"@unocss/preset-mini": "^0.60.0",
"eslint": "^9.2.0",
"eslint-config-hyoban": "^2.2.11",
"esno": "^4.7.0",
"lint-staged": "^15.2.2",
"pnpm": "^9.1.0",
"release-it": "^17.2.1",
"release-it-pnpm": "^4.5.1",
"rimraf": "^5.0.6",
"simple-git-hooks": "^2.11.1",
"typescript": "^5.4.5",
"unbuild": "^2.0.0",
Expand Down
Loading

0 comments on commit 56f5889

Please sign in to comment.