Skip to content

Commit

Permalink
Update release CI to use Poetry (#1283)
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Gonzalez-Martin authored Jul 6, 2023
1 parent c8b44be commit d705fee
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 22 deletions.
36 changes: 16 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,17 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install -r ./requirements/dev.txt
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: false
- name: Build Python wheel
run: |
python setup.py \
sdist -d ./dist \
bdist_wheel -d ./dist
twine upload --skip-existing dist/*
poetry build
poetry publish --skip-existing
env:
TWINE_NON_INTERACTIVE: 1
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.TWINE_USERNAME }}
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
- name: Build Docker Image
run: |
DOCKER_BUILDKIT=1 docker build . \
Expand Down Expand Up @@ -167,20 +165,18 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install -r ./requirements/dev.txt
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: false
- name: Build Python wheel
working-directory: ./runtimes/${{ matrix.runtime }}
run: |
python setup.py \
sdist -d ./dist \
bdist_wheel -d ./dist
twine upload --skip-existing ./dist/*
poetry build
poetry publish --skip-existing
env:
TWINE_NON_INTERACTIVE: 1
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.TWINE_USERNAME }}
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
- name: Build Docker Image
run: |
DOCKER_BUILDKIT=1 docker build . \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ jobs:
ln -sfn $(which docker-buildx) $HOME/.docker/cli-plugins/docker-buildx
colima start --memory 5 --network-driver slirp
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
Expand Down Expand Up @@ -132,6 +131,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Maximize build space
if: runner.os == 'ubuntu'
uses: easimon/maximize-build-space@master
with:
remove-dotnet: "true"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ push:
for _runtime in ./runtimes/*; \
do \
_runtimeName=$$(basename $$_runtime); \
poetry publish -C $$_runtime; \
poetry publish --skip-existing -C $$_runtime; \
docker push ${IMAGE_NAME}:${VERSION}-$$_runtimeName; \
done

Expand Down

0 comments on commit d705fee

Please sign in to comment.