File tree Expand file tree Collapse file tree 3 files changed +53
-0
lines changed Expand file tree Collapse file tree 3 files changed +53
-0
lines changed Original file line number Diff line number Diff line change
1
+ <<<<<<< HEAD
1
2
name : Create releases
2
3
on :
3
4
schedule :
44
45
env :
45
46
DATA : ${{ toJSON(steps.release.outputs) }}
46
47
NPM_TOKEN : ${{ secrets.ANTHROPIC_NPM_TOKEN || secrets.NPM_TOKEN }}
48
+ ||||||| parent of a5a56bc (chore(internal) : fix release workflows)
49
+ =======
50
+ name : Create releases
51
+ on :
52
+ schedule :
53
+ - cron : ' 0 5 * * *' # every day at 5am UTC
54
+ push :
55
+ branches :
56
+ - main
57
+
58
+ jobs :
59
+ release :
60
+ name : release
61
+ if : github.ref == 'refs/heads/main' && github.repository == 'anthropics/anthropic-sdk-typescript'
62
+ runs-on : ubuntu-latest
63
+ environment : production-release
64
+
65
+ steps :
66
+ - uses : actions/checkout@v4
67
+
68
+ - uses : stainless-api/trigger-release-please@v1
69
+ id : release
70
+ with :
71
+ repo : ${{ github.event.repository.full_name }}
72
+ stainless-api-key : ${{ secrets.STAINLESS_API_KEY }}
73
+
74
+ - name : Set up Node
75
+ if : ${{ steps.release.outputs.releases_created }}
76
+ uses : actions/setup-node@v3
77
+ with :
78
+ node-version : ' 20'
79
+
80
+ - name : Install dependencies
81
+ if : ${{ steps.release.outputs.releases_created }}
82
+ run : |
83
+ yarn install
84
+
85
+ - name : Publish to NPM
86
+ if : ${{ steps.release.outputs.releases_created }}
87
+ run : |
88
+ yarn tsn scripts/publish-packages.ts
89
+
90
+ env :
91
+ DATA : ${{ toJSON(steps.release.outputs) }}
92
+ NPM_TOKEN : ${{ secrets.ANTHROPIC_NPM_TOKEN || secrets.NPM_TOKEN }}
93
+ >>>>>>> a5a56bc (chore(internal): fix release workflows)
Original file line number Diff line number Diff line change 2
2
# you can run this workflow by navigating to https://www.github.com/anthropics/anthropic-sdk-typescript/actions/workflows/publish-npm.yml
3
3
name : Publish NPM
4
4
on :
5
+
6
+
5
7
workflow_dispatch :
6
8
inputs :
7
9
path :
Original file line number Diff line number Diff line change 2
2
3
3
errors=()
4
4
5
+ if [ -z " ${STAINLESS_API_KEY} " ]; then
6
+ errors+=(" The STAINLESS_API_KEY secret has not been set. Please contact Stainless for an API key & set it in your organization secrets on GitHub." )
7
+ fi
8
+
5
9
if [ -z " ${NPM_TOKEN} " ]; then
6
10
errors+=(" The ANTHROPIC_NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets" )
7
11
fi
You can’t perform that action at this time.
0 commit comments