Skip to content

Commit

Permalink
auth
Browse files Browse the repository at this point in the history
  • Loading branch information
SokolAndrey committed Nov 30, 2024
1 parent a5df548 commit 84098e6
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,20 @@ jobs:
# run: python3 -m pip wheel "${{ steps.sdist.outputs.paths }}" --wheel-dir=${{env.WHEEL_DST}} --verbose


- name: Authenticate with AWS CodeArtifact
run: |
CODEARTIFACT_AUTH_TOKEN=$(aws codeartifact get-authorization-token --domain ${{env.DOMAIN}} --query authorizationToken --output text)
echo "[distutils]" > ~/.pypirc
echo "index-servers = codeartifact" >> ~/.pypirc
echo "[codeartifact]" >> ~/.pypirc
echo "repository: ${{ env.REPOSITORY }}" >> ~/.pypirc
echo "username: aws" >> ~/.pypirc
echo "password: ${CODEARTIFACT_AUTH_TOKEN}" >> ~/.pypirc
# - name: Authenticate with AWS CodeArtifact
# run: |
# CODEARTIFACT_AUTH_TOKEN=$(aws codeartifact get-authorization-token --domain ${{env.DOMAIN}} --query authorizationToken --output text)
# echo "[distutils]" > ~/.pypirc
# echo "index-servers = codeartifact" >> ~/.pypirc
# echo "[codeartifact]" >> ~/.pypirc
# echo "repository: ${{ env.REPOSITORY }}" >> ~/.pypirc
# echo "username: aws" >> ~/.pypirc
# echo "password: ${CODEARTIFACT_AUTH_TOKEN}" >> ~/.pypirc

- name: Publish
run: |
# export TWINE_USERNAME=aws
# export TWINE_PASSWORD=`aws codeartifact get-authorization-token --domain ${{env.DOMAIN}} --query authorizationToken --output text`
# export TWINE_REPOSITORY_URL=`aws codeartifact get-repository-endpoint --domain ${{env.DOMAIN}} --repository ${{ env.REPOSITORY }} --region us-east-1 --format pypi --query repositoryEndpoint --output text`
# aws codeartifact login --tool twine --domain ${{env.DOMAIN}} --repository ${{ env.REPOSITORY }}
aws codeartifact login --tool twine --domain ${{env.DOMAIN}} --repository ${{ env.REPOSITORY }}
twine upload --verbose --repository codeartifact ${{env.WHEEL_DST}}/*.whl

0 comments on commit 84098e6

Please sign in to comment.