3636 path : |
3737 ~/.dub
3838 ~/AppData/Local/dub
39+ ~/.pnpm
3940 ~/.pnpm-store
4041 D:\.pnpm-store
42+ D:\.pnpm
4143 ./.dub
4244 key : " cache-OS:${{ matrix.os }}-D:${{ matrix.d }}-CXX:${{ matrix.compiler }}-${{ hashFiles('./dub.selections.json', './pnpm-lock.yaml')}} }}"
4345 restore-keys : |
@@ -90,10 +92,18 @@ jobs:
9092 with :
9193 name : minijson-${{ runner.os }}-${{ runner.arch }}
9294 path : ./dist
95+ retention-days : 1
9396
9497 Release :
98+ if : startsWith(github.ref, 'refs/tags/')
9599 runs-on : ubuntu-latest
96100 needs : build
101+ strategy :
102+ matrix :
103+ node :
104+ - 20
105+ pnpm :
106+ - 9
97107 steps :
98108 - name : Merge Artifacts
99109 uses : actions/upload-artifact/merge@v4
@@ -106,7 +116,7 @@ jobs:
106116 name : merged-artifacts
107117 path : dist/
108118
109- - name : Prepare
119+ - name : Prepare Dist
110120 run : |
111121 chmod +x ./dist/*/minijson
112122 zip -9 -j ./dist/minijson-windows-x64.zip ./dist/win32-x64/minijson.exe
@@ -116,7 +126,6 @@ jobs:
116126 ls -l ./dist
117127
118128 - name : Draft the release
119- if : startsWith(github.ref, 'refs/tags/')
120129 uses : meeDamian/github-release@2.0
121130 with :
122131 token : ${{ secrets.GITHUB_TOKEN }}
@@ -128,8 +137,22 @@ jobs:
128137 dist/minijson-macos-arm64.tar.gz
129138 dist/minijson-linux-x64.tar.gz
130139
140+ - uses : actions/checkout@v4
141+
142+ - name : Setup Node
143+ uses : actions/setup-node@v4
144+ with :
145+ node-version : ${{ matrix.node }}
146+
147+ - name : Setup Pnpm
148+ uses : pnpm/action-setup@v4
149+ with :
150+ version : ${{ matrix.pnpm }}
151+
152+ - name : Install dependencies
153+ run : pnpm install
154+
131155 - name : Publish to npm
132- if : startsWith(github.ref, 'refs/tags/')
133- run : pnpm publish
156+ run : npm publish
134157 env :
135158 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
0 commit comments