Skip to content

Commit 9f07f88

Browse files
committed
feat: add preview actions
1 parent 6cf7031 commit 9f07f88

42 files changed

Lines changed: 123949 additions & 40155 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
/scratchpad/
2-
/test-sdks/
3-
/dist/
1+
dist

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist/** linguist-generated=true

.github/workflows/build.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,30 @@ name: build
33
on: push
44

55
jobs:
6-
eslint:
6+
build:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v4
10+
with:
11+
# use a token so we trigger release-please if needed
12+
token: ${{ secrets.BOT_GITHUB_TOKEN }}
1013
- name: Setup Node
1114
uses: actions/setup-node@v4
1215
with:
13-
cache: "yarn"
14-
node-version: "20"
15-
- run: yarn install
16-
- run: yarn run build
16+
node-version: "22"
17+
- name: Install dependencies
18+
run: npm install
19+
- name: Build TypeScript
20+
run: npm run build
21+
- name: Commit build changes
22+
if: ${{ github.ref == 'refs/heads/main' }}
23+
run: |
24+
git config --local user.name "github-actions[bot]"
25+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
26+
git add dist
27+
if git diff --cached --quiet HEAD; then
28+
echo "No changes to commit."
29+
else
30+
git commit -m "chore(build): Update dist"
31+
git push
32+
fi

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: googleapis/release-please-action@v4
14+
id: release
15+
with:
16+
release-type: node
17+
target-branch: ${{ github.ref_name }}
18+
- uses: actions/checkout@v4
19+
- name: tag major and minor versions
20+
if: ${{ steps.release.outputs.release_created }}
21+
run: |
22+
git config --local user.name "github-actions[bot]"
23+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
24+
git tag -d v${{ steps.release.outputs.major }} || true
25+
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
26+
git push origin :v${{ steps.release.outputs.major }} || true
27+
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
28+
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}"
29+
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
30+
git push origin v${{ steps.release.outputs.major }}
31+
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
name: lint
1+
name: test
22

33
on: push
44

55
jobs:
6-
eslint:
6+
test:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v4
1010
- name: Setup Node
1111
uses: actions/setup-node@v4
1212
with:
13-
cache: "yarn"
14-
node-version: "20"
15-
- run: yarn install
16-
- run: yarn run lint
13+
node-version: "22"
14+
- name: Install dependencies
15+
run: npm install
16+
- name: Run tests
17+
run: npm run test

.gitignore

Lines changed: 0 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
lerna-debug.log*
8-
9-
# Diagnostic reports (https://nodejs.org/api/report.html)
10-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11-
12-
# Runtime data
13-
pids
14-
*.pid
15-
*.seed
16-
*.pid.lock
17-
18-
# Directory for instrumented libs generated by jscoverage/JSCover
19-
lib-cov
20-
21-
# Coverage directory used by tools like istanbul
22-
coverage
23-
*.lcov
24-
25-
# nyc test coverage
26-
.nyc_output
27-
28-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29-
.grunt
30-
31-
# Bower dependency directory (https://bower.io/)
32-
bower_components
33-
34-
# node-waf configuration
35-
.lock-wscript
36-
37-
# Compiled binary addons (https://nodejs.org/api/addons.html)
38-
build/Release
39-
40-
# Dependency directories
411
node_modules/
42-
jspm_packages/
43-
44-
# TypeScript v1 declaration files
45-
typings/
46-
47-
# TypeScript cache
48-
*.tsbuildinfo
49-
50-
# Optional npm cache directory
51-
.npm
52-
53-
# Optional eslint cache
54-
.eslintcache
55-
56-
# Microbundle cache
57-
.rpt2_cache/
58-
.rts2_cache_cjs/
59-
.rts2_cache_es/
60-
.rts2_cache_umd/
61-
62-
# Optional REPL history
63-
.node_repl_history
64-
65-
# Output of 'npm pack'
66-
*.tgz
67-
68-
# Yarn Integrity file
69-
.yarn-integrity
70-
71-
# dotenv environment variables file
72-
.env
73-
.env.test
74-
75-
# parcel-bundler cache (https://parceljs.org/)
76-
.cache
77-
78-
# Next.js build output
79-
.next
80-
81-
# Nuxt.js build / generate output
82-
.nuxt
83-
84-
# Gatsby files
85-
.cache/
86-
# Comment in the public line in if your project uses Gatsby and *not* Next.js
87-
# https://nextjs.org/blog/next-9-1#public-directory-support
88-
# public
89-
90-
# vuepress build output
91-
.vuepress/dist
92-
93-
# Serverless directories
94-
.serverless/
95-
96-
# FuseBox cache
97-
.fusebox/
98-
99-
# DynamoDB Local files
100-
.dynamodb/
101-
102-
# TernJS port file
103-
.tern-port
104-
105-
lithic*

.gitlab-ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ image: node:20-alpine
77
- apk add --no-cache git
88
- git clone https://github.com/stainless-api/upload-openapi-spec-action.git
99
- cd upload-openapi-spec-action
10-
- yarn install
1110
- node dist/index.js
1211
variables:
1312
INPUT_STAINLESS_API_KEY: $STAINLESS_API_KEY

.husky/pre-commit

Lines changed: 0 additions & 6 deletions
This file was deleted.

LICENSE

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)