Skip to content

Commit 616cd0c

Browse files
committed
1.0.3 Release
Prepare for npm trusted publisher setup, adding workflow file for publishing, and removing build output from repo. * Format ./src/index.ts, ./test/* * In package.json - update format script - add engines section with node version >= 20 * Added main.yml - contains build and publish jobs * Remove .bin - build in CI before publishing * Add .bin to .gitignore
1 parent bb67bb2 commit 616cd0c

File tree

18 files changed

+203
-670
lines changed

18 files changed

+203
-670
lines changed

.github/workflows/main.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
6+
pull_request:
7+
release:
8+
types: [published]
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Check formatting
18+
run: npm run format:check
19+
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version-file: package.json
23+
cache: npm
24+
25+
# Working around https://github.com/npm/cli/issues/4828
26+
# - run: npm ci
27+
- run: npm install --no-package-lock
28+
29+
- name: Check syntax
30+
run: npm run lint
31+
32+
- name: Check types
33+
run: npm run typecheck
34+
35+
- name: Run tests
36+
run: npm test
37+
38+
- run: npm run build
39+
40+
publish:
41+
runs-on: ubuntu-latest
42+
if: github.event_name == 'release'
43+
environment: release
44+
needs: build
45+
46+
permissions:
47+
contents: read
48+
id-token: write
49+
50+
steps:
51+
- uses: actions/checkout@v4
52+
- uses: actions/setup-node@v4
53+
with:
54+
node-version-file: package.json
55+
cache: npm
56+
registry-url: "https://registry.npmjs.org"
57+
58+
# Working around https://github.com/npm/cli/issues/4828
59+
# - run: npm ci
60+
- run: npm install --no-package-lock
61+
62+
- run: npm run npm:publish:dry-run
63+
64+
- run: npm run npm:publish

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.idea
22
.goose
3-
.goosehints
3+
.bin
44
coverage
55
node_modules

bin/cjs/command/AsyncCommand.js

Lines changed: 0 additions & 38 deletions
This file was deleted.

bin/cjs/command/AsyncMacroCommand.js

Lines changed: 0 additions & 147 deletions
This file was deleted.

bin/cjs/index.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

bin/cjs/package.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

bin/esm/command/AsyncCommand.js

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)