Skip to content

Bump version: 0.1.34 → 0.1.35 #35

Bump version: 0.1.34 → 0.1.35

Bump version: 0.1.34 → 0.1.35 #35

Workflow file for this run

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: Create Docker Buildx instance
run: docker buildx create --use
- name: Extract tag name
id: extract_tag
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Build and push Docker image for amd64
env:
TAG_NAME: ${{ env.TAG_NAME }}
run: |
docker buildx build --platform linux/amd64 -t ${{ secrets.DOCKER_USERNAME }}/lambda-packer:amd64-${{ env.TAG_NAME }} --push .
- name: Build and push Docker image for arm64
env:
TAG_NAME: ${{ env.TAG_NAME }}
run: |
docker buildx build --platform linux/arm64 -t ${{ secrets.DOCKER_USERNAME }}/lambda-packer:arm64-${{ env.TAG_NAME }} --push .