Skip to content

Commit 8633dfc

Browse files
author
Richard Harrah
committed
feat: initial commit
0 parents  commit 8633dfc

20 files changed

+4827
-0
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist

.eslintrc.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
module.exports = {
2+
env: {
3+
node: true,
4+
},
5+
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
6+
parser: "@typescript-eslint/parser",
7+
plugins: ["@typescript-eslint", "simple-import-sort"],
8+
rules: {
9+
"simple-import-sort/imports": "error",
10+
"simple-import-sort/exports": "error",
11+
},
12+
overrides: [
13+
{
14+
files: ["**/*.js"],
15+
rules: {
16+
"@typescript-eslint/no-var-requires": "off",
17+
},
18+
},
19+
],
20+
};

.github/workflows/ci.yml

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
name: 🔄 CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request: {}
8+
9+
permissions:
10+
actions: write
11+
contents: write
12+
13+
jobs:
14+
lint:
15+
name: ⬣ ESLint
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: 🛑 Cancel Previous Runs
19+
uses: styfle/[email protected]
20+
21+
- name: ⬇️ Checkout repo
22+
uses: actions/checkout@v3
23+
24+
- name: 📥 Install pnpm
25+
uses: pnpm/[email protected]
26+
27+
- name: 📥 Use Node.js from .nvmrc
28+
uses: actions/setup-node@v3
29+
with:
30+
cache: "pnpm"
31+
node-version-file: ".nvmrc"
32+
33+
- name: 📥 Install via pnpm
34+
run: pnpm install
35+
shell: bash
36+
37+
- name: 🔬 Lint
38+
run: pnpm run lint
39+
40+
prettier:
41+
name: 🔎 Prettier
42+
runs-on: ubuntu-latest
43+
steps:
44+
- name: 🛑 Cancel Previous Runs
45+
uses: styfle/[email protected]
46+
47+
- name: ⬇️ Checkout repo
48+
uses: actions/checkout@v3
49+
50+
- name: 📥 Install pnpm
51+
uses: pnpm/[email protected]
52+
53+
- name: 📥 Use Node.js from .nvmrc
54+
uses: actions/setup-node@v3
55+
with:
56+
cache: "pnpm"
57+
node-version-file: ".nvmrc"
58+
59+
- name: 📥 Install via pnpm
60+
run: pnpm install
61+
shell: bash
62+
63+
- name: ❤️ Run format:check
64+
run: pnpm run format:check
65+
66+
test:
67+
name: ⚡ Test
68+
runs-on: ubuntu-latest
69+
steps:
70+
- name: 🛑 Cancel Previous Runs
71+
uses: styfle/[email protected]
72+
73+
- name: ⬇️ Checkout repo
74+
uses: actions/checkout@v3
75+
76+
- name: 📥 Install pnpm
77+
uses: pnpm/[email protected]
78+
79+
- name: 📥 Use Node.js from .nvmrc
80+
uses: actions/setup-node@v3
81+
with:
82+
cache: "pnpm"
83+
node-version-file: ".nvmrc"
84+
85+
- name: 📥 Install via pnpm
86+
run: pnpm install
87+
shell: bash
88+
89+
- name: ⚡ Run tests
90+
run: pnpm run test
91+
92+
integration-test:
93+
name: ⚡ Integration Test
94+
runs-on: ubuntu-latest
95+
steps:
96+
- name: 🛑 Cancel Previous Runs
97+
uses: styfle/[email protected]
98+
99+
- name: ⬇️ Checkout repo
100+
uses: actions/checkout@v3
101+
102+
- name: 📥 Install pnpm
103+
uses: pnpm/[email protected]
104+
105+
- name: 📥 Use Node.js from .nvmrc
106+
uses: actions/setup-node@v3
107+
with:
108+
cache: "pnpm"
109+
node-version-file: ".nvmrc"
110+
111+
- name: 📥 Install via pnpm
112+
run: pnpm install
113+
shell: bash
114+
115+
- name: 🏠 Run build
116+
run: pnpm run build
117+
118+
- name: ⚡ Run integration tests
119+
uses: ./
120+
with:
121+
dryRun: true
122+
slackWebhook: "invalid-slack-webhook"
123+
124+
release:
125+
name: 🚀 Release
126+
runs-on: ubuntu-latest
127+
needs: [lint, prettier, test, integration-test]
128+
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
129+
steps:
130+
- name: 🛑 Cancel Previous Runs
131+
uses: styfle/[email protected]
132+
133+
- name: ⬇️ Checkout repo
134+
uses: actions/checkout@v3
135+
with:
136+
# This makes Actions fetch all Git history so that release-it can generate changelogs with the correct commits
137+
fetch-depth: 0
138+
139+
- name: 📥 Install pnpm
140+
uses: pnpm/[email protected]
141+
142+
- name: 📥 Use Node.js from .nvmrc
143+
uses: actions/setup-node@v3
144+
with:
145+
cache: "pnpm"
146+
node-version-file: ".nvmrc"
147+
148+
- name: 📥 Install via pnpm
149+
run: pnpm install
150+
shell: bash
151+
152+
- name: 🚀 Semantic Release
153+
run: pnpm dlx semantic-release
154+
env:
155+
GH_TOKEN: ${{ secrets.TAG_PAT }}
156+
GITHUB_TOKEN: ${{ secrets.TAG_PAT }}

.github/workflows/versioning.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Keep the versions up-to-date
2+
3+
on:
4+
release:
5+
types: [published, edited]
6+
7+
jobs:
8+
actions-tagger:
9+
runs-on: windows-latest
10+
steps:
11+
- uses: Actions-R-Us/actions-tagger@latest
12+
with:
13+
publish_latest_tag: true
14+
token: ${{ secrets.TAG_PAT }}

0 commit comments

Comments
 (0)