Skip to content

Commit

Permalink
Merge pull request #3 from anthropics/justin/npm-publish
Browse files Browse the repository at this point in the history
Publish to NPM, set up continuous deployment
  • Loading branch information
jspahrsummers authored Jan 31, 2023
2 parents 6b6a018 + 3a2ee26 commit a4ee579
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"vscode": {
"extensions": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
}
}
},

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
Expand All @@ -17,7 +17,7 @@
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",
"postCreateCommand": "yarn install"

// Configure tool-specific properties.
// "customizations": {},
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,22 @@ jobs:
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn lint

publish:
if: ${{ github.event_name == 'release' }}
needs: [build]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"

- name: Prepare to publish
run: echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > .npmrc

- run: npm publish
env:
NPM_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "anthropic",
"version": "0.2.0",
"name": "@anthropic-ai/sdk",
"version": "0.2.1",
"description": "Library for accessing the Anthropic API",
"repository": "https://github.com/anthropics/anthropic-sdk-typescript",
"license": "MIT",
Expand Down

0 comments on commit a4ee579

Please sign in to comment.