Skip to content

Commit 51a8782

Browse files
committed
chore: setup github action for publishing package
1 parent 63b3685 commit 51a8782

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ jobs:
55
runs-on: ubuntu-latest
66
name: Build and test
77
steps:
8-
- uses: actions/checkout@v1
8+
- uses: actions/checkout@v4
99

10-
- uses: actions/cache@v2
10+
- uses: actions/cache@v4
1111
with:
1212
path: '/home/runner/work/codemirror/codemirror/node_modules'
1313
key: ${{ runner.os }}-modules

.github/workflows/publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish Package
2+
3+
on:
4+
push:
5+
tags:
6+
- '[0-9]+.[0-9]+.[0-9]+'
7+
8+
permissions:
9+
id-token: write
10+
contents: read
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: '22'
21+
registry-url: 'https://registry.npmjs.org'
22+
23+
- run: npm ci
24+
25+
- run: npm run build --if-present
26+
27+
- run: npm test
28+
29+
- run: npm publish

0 commit comments

Comments
 (0)