Skip to content

Commit 23c0877

Browse files
committed
chore: test deply to gist
1 parent 7583cea commit 23c0877

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

.github/workflows/gist.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Deploy to gist
2+
3+
on:
4+
workflow_dispatch: {}
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
matrix:
17+
node-version: [16.17.1]
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
with:
22+
fetch-depth: 0
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
- uses: pnpm/action-setup@v2.0.1
28+
name: Install pnpm
29+
id: pnpm-install
30+
with:
31+
version: 7
32+
run_install: false
33+
- name: Get pnpm store directory
34+
id: pnpm-cache
35+
run: |
36+
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
37+
- uses: actions/cache@v3
38+
name: Setup pnpm cache
39+
with:
40+
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
41+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
42+
restore-keys: |
43+
${{ runner.os }}-pnpm-store-
44+
- run: pnpm install
45+
- run: pnpm run pack
46+
- name: upload-to-gist
47+
uses: tim-smart/actions-upload-to-gist@v2
48+
with:
49+
token: ${{ secrets.GIST_TOKEN }}
50+
gist_id: 2249154d563bbbdd603cb09e834361e8
51+
path: build/artifacts

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
"docs-update": "git add --force --all docs/modules || true",
4646
"circular": "madge --ts-config ./tsconfig.madge.json --circular --no-color --no-spinner --warning build/esm",
4747
"test": "vitest",
48-
"coverage": "vitest run --coverage"
48+
"coverage": "vitest run --coverage",
49+
"pack": "pnpm build && cd dist && pnpm pack --pack-destination=../build/artifacts"
4950
},
5051
"exports": {
5152
".": {

0 commit comments

Comments
 (0)