refactor: separate .env from deployed endpoint env vars (#257) #207
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| issues: write | |
| id-token: write | |
| env: | |
| PYTHON_VERSION: '3.11' | |
| jobs: | |
| # Run quality checks | |
| quality-gates: | |
| name: Quality Gates | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v2 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: make dev | |
| - name: Quality checks | |
| run: make quality-check | |
| # Release orchestration | |
| release-please: | |
| name: Release Please | |
| runs-on: ubuntu-latest | |
| needs: [quality-gates] | |
| outputs: | |
| release_created: ${{ steps.release.outputs.release_created }} | |
| steps: | |
| - name: Generate GitHub App Token | |
| id: app-token | |
| uses: actions/create-github-app-token@v2 | |
| with: | |
| app-id: ${{ secrets.RELEASE_APP_ID }} | |
| private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} | |
| - name: Run Release Please | |
| uses: google-github-actions/release-please-action@v4 | |
| id: release | |
| with: | |
| token: ${{ steps.app-token.outputs.token }} | |
| # PyPI publishing | |
| pypi-publish: | |
| name: PyPI Publish | |
| runs-on: ubuntu-latest | |
| needs: [release-please] | |
| if: ${{ needs.release-please.outputs.release_created == 'true' }} | |
| environment: | |
| name: pypi-production | |
| url: https://pypi.org/project/runpod-flash/ | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v2 | |
| with: | |
| enable-cache: true | |
| - name: Build package | |
| run: make build | |
| - name: Verify package | |
| run: uv run twine check dist/* | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| verbose: true |