diff --git a/.github/workflows/release-udp-exporter.yml b/.github/workflows/release-udp-exporter.yml index 314582bf8..f55637f05 100644 --- a/.github/workflows/release-udp-exporter.yml +++ b/.github/workflows/release-udp-exporter.yml @@ -1,12 +1,17 @@ name: Release ADOT OTLP UDP Exporter on: + push: + branches: + - "test-pypi" workflow_dispatch: inputs: version: description: 'Version number for deployment e.g. 0.1.0' required: true type: string +env: + AWS_DEFAULT_REGION: us-east-1 jobs: build-test-publish: @@ -74,4 +79,25 @@ jobs: exit 1 fi - # TODO: Steps to publish to PyPI + - name: Configure AWS credentials for PyPI secrets + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.AWS_ROLE_ARN_SECRETS_MANAGER }} + aws-region: ${{ env.AWS_DEFAULT_REGION }} + + - name: Get PyPI secrets + uses: aws-actions/aws-secretsmanager-get-secrets@v1 + id: pypi_secrets + with: + secret-ids: | + TEST_PYPI_TOKEN,${{ secrets.PYPI_TEST_TOKEN_SECRET_ARN }} + parse-json-secrets: true + + # The step below publishes to testpypi in order to catch any issues + # with the package configuration that would cause a failure to upload to PyPI. + - name: Publish to TestPyPI + env: + TWINE_USERNAME: '__token__' + TWINE_PASSWORD: ${{ env.TEST_PYPI_TOKEN_API_TOKEN }} + run: | + twine upload --repository testpypi --skip-existing --verbose dist/${{ env.ARTIFACT_NAME }} diff --git a/exporters/aws-otel-otlp-udp-exporter/pyproject.toml b/exporters/aws-otel-otlp-udp-exporter/pyproject.toml index bff54cbf7..14854ea67 100644 --- a/exporters/aws-otel-otlp-udp-exporter/pyproject.toml +++ b/exporters/aws-otel-otlp-udp-exporter/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "aws-otel-otlp-udp-exporter" -version = "0.1.0" +version = "0.0.1" description = "OTLP UDP Exporter for OpenTelemetry" readme = "README.rst" license = "Apache-2.0"