Skip to content

Commit 354514b

Browse files
committed
Added windows to CI, build to dist directory, rewrite in typescript (#17)
* Added windows to c, build to dist directory * Migrate to TypeScript * fix(format): make file paths explicit for js-beautify
1 parent 21f4560 commit 354514b

File tree

9 files changed

+922
-866
lines changed

9 files changed

+922
-866
lines changed

.github/workflows/build-and-release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
name: Build and zip
4949
run: |
5050
npm run build
51-
zip -r build-v${{ steps.get_version.outputs.VERSION }}.zip index.js
51+
zip -r build-v${{ steps.get_version.outputs.VERSION }}.zip dist
5252
- if: steps.tag_check.outputs.skip == 'false'
5353
name: Create tag with only build output
5454
run: |
@@ -58,7 +58,7 @@ jobs:
5858
TMP_BRANCH=release-tmp-$TAG
5959
git checkout -b $TMP_BRANCH
6060
git rm -rf src
61-
git add -f index.js
61+
git add -f dist/index.js
6262
git reset HEAD package.json package-lock.json
6363
git commit -m "build: release $TAG"
6464
git tag $TAG

.github/workflows/test.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,18 @@ on:
77

88
jobs:
99
integration-test:
10-
runs-on: ubuntu-latest
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest, windows-latest]
1114
steps:
1215
- uses: actions/checkout@v5
13-
- run: npm clean-install
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v6
18+
with:
19+
node-version: '20'
20+
- name: Install dependencies
21+
run: npm clean-install
1422
- name: Check formatting with js-beautify
1523
run: |
1624
npm run format
@@ -26,6 +34,7 @@ jobs:
2634
if [ "${{ steps.ghc-version-inclusive.outputs.ghc-version }}" != "9.0.1" ]; then
2735
exit 1
2836
fi
37+
shell: bash
2938
- name: Run action with exclusive upper bound
3039
uses: ./
3140
with:
@@ -36,3 +45,4 @@ jobs:
3645
if [ "${{ steps.ghc-version-exclusive.outputs.ghc-version }}" != "8.10.7" ]; then
3746
exit 1
3847
fi
48+
shell: bash

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
node_modules
2-
/index.js
2+
dist

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Finds the latest GHC version that supports the base upper bound in
44

55
runs:
66
using: node20
7-
main: index.js
7+
main: ./dist/index.js
88

99
inputs:
1010
package-yaml-path:

0 commit comments

Comments
 (0)