diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 70ca3ee5a..273dbfc66 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,65 +1,40 @@ -name: Upload Python Package +name: (Legacy) Upload Python Package on: push: - tags: - - v* - workflow_dispatch: -permissions: - contents: read jobs: build: strategy: matrix: - os: [ ubuntu-latest-8, macos-latest] + os: [ ubuntu-latest-8, macos-latest ] python: [3.12, 3.13 ] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - ref: ${{ github.event.pull_request.head.ref || github.ref }} + - name: Setup backend uses: ./.github/actions/setup-backend with: python-version: ${{ matrix.python }} - - name: Get history and tags for SCM versioning to work - run: | - git branch - git fetch --depth=1 origin +refs/tags/*:refs/tags/* - name: Build release distributions run: | uv build --wheel env: HATCH_BUILD_HOOKS_ENABLE: true - - name: Upload distributions - uses: actions/upload-artifact@v4 - with: - name: wheels-${{ matrix.os }}-${{ matrix.python }} - path: dist/ - release: - needs: build - runs-on: ubuntu-latest-8 - permissions: - contents: write - environment: release - steps: - - uses: actions/checkout@v4 - - name: Setup backend - uses: ./.github/actions/setup-backend - - name: Download All Artifacts - uses: actions/download-artifact@v4 - with: - path: dist - merge-multiple: true - pattern: wheels-* - - name: Make github release - uses: softprops/action-gh-release@v2 - if: startsWith(github.ref, 'refs/tags/') + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 with: - files: dist/* - fail_on_unmatched_files: true - generate_release_notes: true + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-west-1 + + - name: Release to AWS codeartifact + run: | + export UV_PUBLISH_PASSWORD="$(aws codeartifact get-authorization-token --domain codegen --domain-owner 922078275900 --region us-east-1 --query authorizationToken --output text)" + export UV_PUBLISH_USERNAME=aws + uv publish --publish-url https://codegen-922078275900.d.codeartifact.us-east-1.amazonaws.com/pypi/codegen/ diff --git a/pyproject.toml b/pyproject.toml index 12560ba39..9d997f620 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,7 @@ [project] name = "codegen-sdk" -dynamic = ["version", "urls"] +dynamic = [ "urls"] +version = "7.1.0" description = "Add your description here" readme = "README.md" # renovate: datasource=python-version depName=python