Skip to content

Commit ba98934

Browse files
committed
feat: add github action ci
1 parent bcfb050 commit ba98934

File tree

4 files changed

+134
-0
lines changed

4 files changed

+134
-0
lines changed

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: [nicepkg, 2214962083]
2+
open_collective: nicepkg

.github/stale.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
daysUntilStale: 60
2+
daysUntilClose: 7
3+
exemptLabels:
4+
- pinned
5+
- security
6+
- no-stale
7+
- no stale
8+
- pr welcome
9+
staleLabel: stale
10+
markComment: >
11+
This issue has been automatically marked as stale because it has not had
12+
recent activity. It will be closed if no further activity occurs. Thank you
13+
for your contributions.
14+
closeComment: false

.github/workflows/ci.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
pull_request:
9+
branches:
10+
- main
11+
12+
jobs:
13+
lint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Install pnpm
19+
uses: pnpm/action-setup@v2
20+
21+
- name: Set node
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: 19
25+
cache: pnpm
26+
27+
- name: Install And Build
28+
run: pnpm i
29+
30+
- name: Lint
31+
run: pnpm lint
32+
33+
# test:
34+
# runs-on: ${{ matrix.os }}
35+
36+
# strategy:
37+
# matrix:
38+
# os: [ubuntu-latest]
39+
# node_version: [16.20.0, 19]
40+
# include:
41+
# - os: macos-latest
42+
# node_version: 19
43+
# - os: windows-latest
44+
# node_version: 19
45+
# fail-fast: false
46+
47+
# steps:
48+
# - name: Set git to use LF
49+
# run: |
50+
# git config --global core.autocrlf false
51+
# git config --global core.eol lf
52+
53+
# - uses: actions/checkout@v3
54+
55+
# - name: Install pnpm
56+
# uses: pnpm/action-setup@v2
57+
58+
# - name: Set node ${{ matrix.node_version }}
59+
# uses: actions/setup-node@v3
60+
# with:
61+
# node-version: ${{ matrix.node_version }}
62+
# cache: pnpm
63+
64+
# - name: Install And Build
65+
# run: pnpm i
66+
67+
# - name: Test
68+
# run: pnpm test
69+
70+
# - name: Typecheck
71+
# run: pnpm typecheck

.github/workflows/release.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
permissions:
11+
id-token: write
12+
contents: write
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Install pnpm
20+
uses: pnpm/action-setup@v2
21+
22+
- name: Set node
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: 19
26+
cache: pnpm
27+
registry-url: 'https://registry.npmjs.org'
28+
29+
- run: npx changelogithub
30+
env:
31+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
32+
33+
- name: Install Dependencies And Build
34+
run: pnpm i
35+
36+
- name: Publish to NPM
37+
run: pnpm -r publish --access public --no-git-checks
38+
env:
39+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
40+
NPM_CONFIG_PROVENANCE: true
41+
42+
# - name: Publish to VSCE & OVSX
43+
# run: npm run publish
44+
# working-directory: ./packages/gpt-runner-vscode
45+
# env:
46+
# VSCE_TOKEN: ${{secrets.VSCE_TOKEN}}
47+
# OVSX_TOKEN: ${{secrets.OVSX_TOKEN}}

0 commit comments

Comments
 (0)