Skip to content

Release as beta version #204

Release as beta version

Release as beta version #204

name: Release Candidates
on:
push:
branches:
- beta
permissions:
contents: write
jobs:
release:
name: Release Candidate
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.1
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Test Python SDK
working-directory: python
run: |
poetry install
poetry run pytest -n 4 --verbose -x
env:
E2B_API_KEY: ${{ secrets.E2B_API_KEY }}
- name: Release Candidate
working-directory: python
run: |
poetry build
poetry config pypi-token.pypi ${PYPI_TOKEN} && poetry publish --skip-existing
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
- name: Commit new versions
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git commit -am "[skip ci] Release new versions" || exit 0
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}