@@ -504,30 +504,13 @@ jobs:
504504 echo "All Python wheels:"
505505 ls -la python-wheels/
506506
507- - name : Configure CodeArtifact for Gradle
507+ - name : Configure CodeArtifact for twine
508508 run : |
509- # Get CodeArtifact authorization token
510- export CODEARTIFACT_AUTH_TOKEN=$(aws codeartifact get-authorization-token \
511- --domain $CODEARTIFACT_DOMAIN \
512- --query authorizationToken --output text)
513-
514- # Get repository endpoint
515- export CODEARTIFACT_REPOSITORY_ENDPOINT=$(aws codeartifact get-repository-endpoint \
516- --domain $CODEARTIFACT_DOMAIN \
517- --repository $CODEARTIFACT_REPOSITORY \
518- --format pypi --query repositoryEndpoint --output text)
519-
520- echo "CODEARTIFACT_AUTH_TOKEN=$CODEARTIFACT_AUTH_TOKEN" >> $GITHUB_ENV
521- echo "CODEARTIFACT_REPOSITORY_ENDPOINT=$CODEARTIFACT_REPOSITORY_ENDPOINT" >> $GITHUB_ENV
509+ aws codeartifact login --tool twine --domain $CODEARTIFACT_DOMAIN --repository $CODEARTIFACT_REPOSITORY
522510
523511 - name : Publish Python packages to CodeArtifact
524512 run : |
525- twine upload --repository-url $CODEARTIFACT_REPOSITORY_ENDPOINT \
526- --username aws --password $CODEARTIFACT_AUTH_TOKEN \
527- python-wheels/*.whl
528- env :
529- CODEARTIFACT_AUTH_TOKEN : ${{ env.CODEARTIFACT_AUTH_TOKEN }}
530- CODEARTIFACT_REPOSITORY_ENDPOINT : ${{ env.CODEARTIFACT_REPOSITORY_ENDPOINT }}
513+ twine upload python-wheels/*.whl
531514
532515 generate-js-packages :
533516 needs : [tag-release, generate-rust-binary]
@@ -555,29 +538,13 @@ jobs:
555538 role-session-name : superposition-release
556539 role-to-assume : ${{ secrets.AWS_ARTIFACT_ROLE }}
557540
558- - name : Configure CodeArtifact for npm
559- run : |
560- # Get CodeArtifact authorization token
561- export CODEARTIFACT_AUTH_TOKEN=$(aws codeartifact get-authorization-token \
562- --domain $CODEARTIFACT_DOMAIN \
563- --query authorizationToken --output text)
564-
565- # Get repository endpoint
566- export CODEARTIFACT_REPOSITORY_ENDPOINT=$(aws codeartifact get-repository-endpoint \
567- --domain $CODEARTIFACT_DOMAIN \
568- --repository $CODEARTIFACT_REPOSITORY \
569- --format npm --query repositoryEndpoint --output text)
570-
571- echo "CODEARTIFACT_AUTH_TOKEN=$CODEARTIFACT_AUTH_TOKEN" >> $GITHUB_ENV
572- echo "CODEARTIFACT_REPOSITORY_ENDPOINT=$CODEARTIFACT_REPOSITORY_ENDPOINT" >> $GITHUB_ENV
573-
574- # Configure npm to use CodeArtifact
575- npm config set registry=$CODEARTIFACT_REPOSITORY_ENDPOINT
576- npm config set //$CODEARTIFACT_REPOSITORY_ENDPOINT:_authToken=$CODEARTIFACT_AUTH_TOKEN
577-
578541 - uses : actions/setup-node@v4
579542 with :
580543 node-version : " 20.0.0"
544+
545+ - name : Configure CodeArtifact for npm
546+ run : |
547+ aws codeartifact login --tool npm --domain $CODEARTIFACT_DOMAIN --repository $CODEARTIFACT_REPOSITORY
581548
582549 - name : Download all rust binary artifacts
583550 uses : actions/download-artifact@v4
@@ -594,6 +561,7 @@ jobs:
594561 - name : Extract and organize native libraries
595562 run : |
596563 # Extract all native libraries
564+ mkdir -p clients/javascript/bindings/native-lib
597565 for zip_file in rust-binaries/*.zip; do
598566 echo "Extracting $zip_file"
599567 zip_basename=$(basename "$zip_file" .zip)
@@ -607,7 +575,7 @@ jobs:
607575 filename=$(basename "$lib")
608576 extension="${filename##*.}"
609577 file="libsuperposition_core-$target_triple.$extension"
610- cp "$lib" clients/javascript/bindings/$file
578+ cp "$lib" clients/javascript/bindings/native-lib/ $file
611579 echo "Copied $file"
612580 done
613581
@@ -617,7 +585,7 @@ jobs:
617585
618586 # List what we have
619587 echo "Native libraries in bindings package:"
620- ls -la clients/javascript/bindings
588+ ls -la clients/javascript/bindings/native-lib
621589
622590 - run : |
623591 cd clients/javascript/bindings
0 commit comments