Skip to content

Commit a142609

Browse files
committed
chore: add autorelease
1 parent beb255c commit a142609

File tree

4 files changed

+2555
-12
lines changed

4 files changed

+2555
-12
lines changed

.github/workflows/ci.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: ci
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
16+
token: ${{ secrets.CI_GITHUB_TOKEN }}
17+
18+
- uses: actions/setup-node@v3
19+
with:
20+
always-auth: true
21+
registry-url: https://registry.npmjs.org
22+
23+
- name: Setup Git
24+
run: |
25+
git config --local user.name "GitHub Actions"
26+
git config --local user.email "[email protected]"
27+
28+
- run: npm ci
29+
30+
- name: Tests
31+
run: npm test
32+
33+
- name: Build
34+
run: npm run build
35+
36+
- name: Release
37+
if: github.ref == 'refs/heads/main'
38+
run: npm run release
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
41+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

ossjs.release.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
script: 'npm publish',
3+
}

0 commit comments

Comments
 (0)