Skip to content

Commit

Permalink
chore(ci): fix publish packages script (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot authored and RobertCraigie committed Jan 31, 2024
1 parent e77e068 commit a9fef06
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/create-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ jobs:
- name: Publish to NPM
if: ${{ steps.release.outputs.releases_created }}
run: |
yarn tsn scripts/publish-packages.ts '${{ toJSON(steps.release.outputs) }}'
yarn tsn scripts/publish-packages.ts
env:
DATA: ${{ toJSON(steps.release.outputs) }}
NPM_TOKEN: ${{ secrets.ANTHROPIC_NPM_TOKEN || secrets.NPM_TOKEN }}
7 changes: 4 additions & 3 deletions scripts/publish-packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,16 @@ import { execSync } from 'child_process';
import path from 'path';

function main() {
if (!process.argv[2]) {
const data = process.argv[2] ?? process.env['DATA'];
if (!data) {
throw new Error(`Usage: publish-packages.ts '{"json": "obj"}'`);
}

const rootDir = path.join(__dirname, '..');
console.log('root dir', rootDir);
console.log(`publish-packages called with ${process.argv[2]}`);
console.log(`publish-packages called with ${data}`);

const outputs = JSON.parse(process.argv[2]);
const outputs = JSON.parse(data);

const rawPaths = outputs.paths_released;

Expand Down

0 comments on commit a9fef06

Please sign in to comment.