Skip to content

Commit 86f847f

Browse files
Merge pull request #38 from NxtLvLSoftware/dev-to-dist
Merge dev changes to dist
2 parents 830b856 + 8e38a77 commit 86f847f

15 files changed

Lines changed: 5510 additions & 7830 deletions

File tree

.github/workflows/ci.yml

Lines changed: 55 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ permissions:
1111

1212
env:
1313
GITHUB_ACTIONS: true
14-
NODE_VERSION: 20
14+
NODE_VERSION: 22
15+
PNPM_VERSION: 9
1516

1617
jobs:
1718
test:
@@ -20,26 +21,28 @@ jobs:
2021
timeout-minutes: 5
2122

2223
steps:
23-
- uses: actions/checkout@v3
24+
- uses: actions/checkout@v4
2425

25-
- name: Use Node.js ${{ env.NODE_VERSION }}
26-
uses: actions/setup-node@v3
26+
- name: Use pnpm ${{ env.PNPM_VERSION }}
27+
uses: pnpm/action-setup@v4
2728
with:
28-
node-version: ${{ env.NODE_VERSION }}
29+
version: ${{ env.PNPM_VERSION }}
30+
run_install: false
2931

30-
- name: Cache node_modules
31-
uses: actions/cache@v3
32+
- name: Use Node.js ${{ env.NODE_VERSION }}
33+
uses: actions/setup-node@v4
3234
with:
33-
path: node_modules
34-
key: ${{ runner.os }}}-${{ env.NODE_VERSION }}-node_modules-${{ hashFiles('package.json') }}
35+
node-version: ${{ env.NODE_VERSION }}
36+
cache: pnpm
37+
cache-dependency-path: 'package.json'
3538

3639
- name: Install dependencies
37-
run: npm run clean-install
40+
run: pnpm run clean-install
3841

3942
- name: Build alpine-typescript
40-
run: npm run build-dist
43+
run: pnpm run build-dist
4144

42-
- uses: actions/upload-artifact@v3
45+
- uses: actions/upload-artifact@v4
4346
with:
4447
name: test-build-output
4548
path: |
@@ -54,7 +57,7 @@ jobs:
5457
timeout-minutes: 5
5558

5659
steps:
57-
- uses: actions/checkout@v3
60+
- uses: actions/checkout@v4
5861
with:
5962
sparse-checkout: |
6063
examples/package
@@ -65,7 +68,7 @@ jobs:
6568
mv ./examples/package/* ./
6669
rm -rf ./examples/package
6770
68-
- uses: actions/download-artifact@v3
71+
- uses: actions/download-artifact@v4
6972
with:
7073
name: test-build-output
7174
path: ./alpine-typescript
@@ -74,22 +77,24 @@ jobs:
7477
run: |
7578
sed -i 's/file:..\/..\//file:alpine-typescript/g' package.json
7679
77-
- name: Use Node.js ${{ env.NODE_VERSION }}
78-
uses: actions/setup-node@v3
80+
- name: Use pnpm ${{ env.PNPM_VERSION }}
81+
uses: pnpm/action-setup@v4
7982
with:
80-
node-version: ${{ env.NODE_VERSION }}
83+
version: ${{ env.PNPM_VERSION }}
84+
run_install: false
8185

82-
- name: Cache node_modules
83-
uses: actions/cache@v3
86+
- name: Use Node.js ${{ env.NODE_VERSION }}
87+
uses: actions/setup-node@v4
8488
with:
85-
path: node_modules
86-
key: ${{ runner.os }}}-${{ env.NODE_VERSION }}-node_modules-${{ hashFiles('package.json') }}
89+
node-version: ${{ env.NODE_VERSION }}
90+
cache: pnpm
91+
cache-dependency-path: 'package.json'
8792

8893
- name: Install dependencies
89-
run: npm run clean-install
94+
run: pnpm run clean-install
9095

9196
- name: Build package example
92-
run: npm run build-dist
97+
run: pnpm run build-dist
9398

9499
test-example-project:
95100
name: Run example project tests
@@ -98,7 +103,7 @@ jobs:
98103
timeout-minutes: 5
99104

100105
steps:
101-
- uses: actions/checkout@v3
106+
- uses: actions/checkout@v4
102107
with:
103108
sparse-checkout: |
104109
examples/project
@@ -109,7 +114,7 @@ jobs:
109114
mv ./examples/project/* ./
110115
rm -rf ./examples/project
111116
112-
- uses: actions/download-artifact@v3
117+
- uses: actions/download-artifact@v4
113118
with:
114119
name: test-build-output
115120
path: ./alpine-typescript
@@ -118,22 +123,23 @@ jobs:
118123
run: |
119124
sed -i 's/file:..\/..\//file:alpine-typescript/g' package.json
120125
121-
- name: Use Node.js ${{ env.NODE_VERSION }}
122-
uses: actions/setup-node@v3
126+
- name: Use pnpm ${{ env.PNPM_VERSION }}
127+
uses: pnpm/action-setup@v4
123128
with:
124-
node-version: ${{ env.NODE_VERSION }}
129+
version: ${{ env.PNPM_VERSION }}
130+
run_install: false
125131

126-
- name: Cache node_modules
127-
uses: actions/cache@v3
132+
- name: Use Node.js ${{ env.NODE_VERSION }}
133+
uses: actions/setup-node@v4
128134
with:
129-
path: node_modules
130-
key: ${{ runner.os }}}-${{ env.NODE_VERSION }}-node_modules-${{ hashFiles('package.json') }}
135+
node-version: ${{ env.NODE_VERSION }}
136+
cache: pnpm
131137

132138
- name: Install dependencies
133-
run: npm run clean-install
139+
run: pnpm run clean && pnpm add ./alpine-typescript
134140

135141
- name: Build package example
136-
run: npm run build-dist
142+
run: pnpm run build-dist
137143

138144
stage:
139145
name: Stage changes as pull request
@@ -144,7 +150,7 @@ jobs:
144150
if: github.event_name == 'push'
145151
steps:
146152
- run: 'echo "Staging dev changes"'
147-
- uses: actions/checkout@v3
153+
- uses: actions/checkout@v4
148154
with:
149155
ref: dist
150156

@@ -153,31 +159,33 @@ jobs:
153159
git fetch origin dev:dev
154160
git reset --hard dev
155161
156-
- name: Use Node.js ${{ env.NODE_VERSION }}
157-
uses: actions/setup-node@v3
162+
- name: Use pnpm ${{ env.PNPM_VERSION }}
163+
uses: pnpm/action-setup@v4
158164
with:
159-
node-version: ${{ env.NODE_VERSION }}
165+
version: ${{ env.PNPM_VERSION }}
166+
run_install: false
160167

161-
- name: Cache node_modules
162-
uses: actions/cache@v3
168+
- name: Use Node.js ${{ env.NODE_VERSION }}
169+
uses: actions/setup-node@v4
163170
with:
164-
path: node_modules
165-
key: ${{ runner.os }}}-${{ env.NODE_VERSION }}-node_modules-${{ hashFiles('package.json') }}
171+
node-version: ${{ env.NODE_VERSION }}
172+
cache: pnpm
173+
cache-dependency-path: 'package.json'
166174

167175
- name: Install dependencies
168-
run: npm run clean-install
176+
run: pnpm run clean-install
169177

170178
- name: Build alpine-typescript
171-
run: npm run build-dist
179+
run: pnpm run build-dist
172180

173181
- name: Add dist files
174182
run: |
175183
git rm -r --force ./src
176-
git add --force ./dist
177-
git add --force ./types
184+
git add --force ./dist/*.js
185+
git add --force ./types/*.d.ts
178186
179187
- name: Create Pull Request
180-
uses: peter-evans/create-pull-request@v5
188+
uses: peter-evans/create-pull-request@v7
181189
with:
182190
token: ${{ secrets.STAGE_DEPLOY_KEY }}
183191
title: Merge dev changes to dist

.github/workflows/package-publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ concurrency:
1515

1616
env:
1717
GITHUB_ACTIONS: true
18-
NODE_VERSION: 20
18+
NODE_VERSION: 22
19+
PNPM_VERSION: 9
1920

2021
jobs:
2122
publish:
@@ -27,7 +28,7 @@ jobs:
2728
- uses: actions/checkout@v4
2829

2930
- name: Use Node.js ${{ env.NODE_VERSION }}
30-
uses: actions/setup-node@v3
31+
uses: actions/setup-node@v4
3132
with:
3233
node-version: ${{ env.NODE_VERSION }}
3334
registry-url: 'https://registry.npmjs.org'

.github/workflows/pages-publish.yml

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
name: Publish Pages
22

33
on:
4-
push:
4+
workflow_run:
5+
workflows: ['Publish Package']
56
branches: [dist]
7+
types: [completed]
68

79
permissions:
810
contents: write
@@ -13,43 +15,31 @@ concurrency:
1315

1416
env:
1517
GITHUB_ACTIONS: true
16-
NODE_VERSION: 20
18+
NODE_VERSION: 22
19+
PNPM_VERSION: 9
1720

1821
jobs:
19-
wait-for-package-publish:
20-
name: Wait for package publish workflow success
21-
runs-on: ubuntu-latest
22-
timeout-minutes: 5
23-
24-
steps:
25-
- name: Wait for publish success
26-
uses: lewagon/wait-on-check-action@v1.3.1
27-
with:
28-
ref: ${{ github.ref }}
29-
check-name: Publish to npm registry
30-
repo-token: ${{ secrets.GITHUB_TOKEN }}
31-
wait-interval: 10
32-
3322
build-docs:
3423
name: Generate site
35-
needs: [wait-for-package-publish]
3624
runs-on: ubuntu-latest
3725
timeout-minutes: 5
3826

3927
steps:
4028
- uses: actions/checkout@v4
29+
with:
30+
ref: ${{ github.event.workflow_run.head_branch }}
4131

4232
- name: Remove README.md index lines
4333
run: |
4434
sed -i '28,127d' README.md
4535
4636
- name: Use Node.js ${{ env.NODE_VERSION }}
47-
uses: actions/setup-node@v3
37+
uses: actions/setup-node@v4
4838
with:
4939
node-version: ${{ env.NODE_VERSION }}
5040

5141
- name: Cache node_modules
52-
uses: actions/cache@v3
42+
uses: actions/cache@v4
5343
with:
5444
path: node_modules
5545
key: ${{ runner.os }}}-${{ env.NODE_VERSION }}-node_modules-${{ hashFiles('package.json') }}
@@ -64,7 +54,7 @@ jobs:
6454
run: |
6555
cp ./.github/favicon.ico ./docs-build/favicon.ico
6656
67-
- uses: actions/upload-artifact@v3
57+
- uses: actions/upload-artifact@v4
6858
with:
6959
name: pages-docs-html
7060
path: ./docs-build
@@ -76,7 +66,7 @@ jobs:
7666
timeout-minutes: 5
7767

7868
steps:
79-
- uses: actions/checkout@v3
69+
- uses: actions/checkout@v4
8070
with:
8171
sparse-checkout: |
8272
examples/project
@@ -92,12 +82,12 @@ jobs:
9282
sed -i 's/file:..\/..\//rc/g' package.json
9383
9484
- name: Use Node.js ${{ env.NODE_VERSION }}
95-
uses: actions/setup-node@v3
85+
uses: actions/setup-node@v4
9686
with:
9787
node-version: ${{ env.NODE_VERSION }}
9888

9989
- name: Cache node_modules
100-
uses: actions/cache@v3
90+
uses: actions/cache@v4
10191
with:
10292
path: node_modules
10393
key: ${{ runner.os }}}-${{ env.NODE_VERSION }}-node_modules-${{ hashFiles('package.json') }}
@@ -108,7 +98,7 @@ jobs:
10898
- name: Build example project
10999
run: npm run build-dist
110100

111-
- uses: actions/upload-artifact@v3
101+
- uses: actions/upload-artifact@v4
112102
with:
113103
name: pages-example-html
114104
path: ./dist
@@ -120,12 +110,12 @@ jobs:
120110
timeout-minutes: 5
121111

122112
steps:
123-
- uses: actions/download-artifact@v3
113+
- uses: actions/download-artifact@v4
124114
with:
125115
name: pages-docs-html
126116
path: ./
127117

128-
- uses: actions/download-artifact@v3
118+
- uses: actions/download-artifact@v4
129119
with:
130120
name: pages-example-html
131121
path: ./example
@@ -136,7 +126,7 @@ jobs:
136126
echo "::warning title=Invalid file permissions automatically fixed::$line"
137127
done
138128
139-
- uses: actions/upload-pages-artifact@v2
129+
- uses: actions/upload-pages-artifact@v3
140130
with:
141131
name: github-pages
142132
path: ./
@@ -158,4 +148,4 @@ jobs:
158148
steps:
159149
- name: Deploy to GitHub Pages
160150
id: deployment
161-
uses: actions/deploy-pages@v2
151+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Project specific files
2-
package-lock.json
2+
pnpm-lock.yaml
33
/node_modules
44
.github/**/node_modules
55
dist/

0 commit comments

Comments
 (0)