Skip to content

Commit ca05937

Browse files
authored
chore(ci): automate npm publishing (#22)
* chore(ci): automate NPM publishing * chore: remove unnecessary files
1 parent 289d316 commit ca05937

File tree

4 files changed

+31
-31
lines changed

4 files changed

+31
-31
lines changed

.github/CODEOWNERS

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

.github/FUNDING.yml

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

.github/pull_request_template.md

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

.github/workflows/npm-publish.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish Package to npmjs
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
id-token: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: '20.x'
19+
registry-url: 'https://registry.npmjs.org'
20+
scope: '@stainless-api'
21+
cache: 'yarn'
22+
23+
- run: yarn install --frozen-lockfile
24+
25+
- run: yarn build
26+
27+
- run: yarn test
28+
29+
- run: yarn workspaces foreach --no-private npm publish --provenance --access public
30+
env:
31+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)