Bump version: 0.1.47 → 0.1.48 #47
Workflow file for this run
This file contains 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: Publish Python Package | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.10.x] | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install -e .[dev] | |
- name: Pull Docker image | |
run: docker pull public.ecr.aws/lambda/python:3.12 | |
- name: Run tests | |
run: pytest --log-cli-level=INFO | |
- name: Install build tools | |
run: | | |
pip install build | |
- name: Build the package | |
run: | | |
python -m build | |
- name: Publish to PyPI | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
run: | | |
twine upload dist/* | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Extract tag name | |
id: extract_tag | |
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
env: | |
TAG_NAME: ${{ env.TAG_NAME }} | |
with: | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: cesaralvernaz/lambda-packer:${{ env.TAG_NAME }} |