Skip to content

chore(deps): update python docker tag to v3.14 #469

chore(deps): update python docker tag to v3.14

chore(deps): update python docker tag to v3.14 #469

Workflow file for this run

name: Build and Publish Package
on:
pull_request:
branches:
- main
types:
- closed
jobs:
publish-package:
if: ${{ github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/v') }}
runs-on: ubuntu-latest
environment: publish
permissions:
contents: write
deployments: write
id-token: write
packages: write
steps:
- name: Check out repo main branch
uses: actions/checkout@v6
with:
ref: main
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: ".python-version"
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.9.18"
- name: Get project Version
id: project_version
run: echo "project_version=$(uv version --short)" >> $GITHUB_OUTPUT
- name: Build package
run: uv build
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Create a Github Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.project_version.outputs.project_version }}
target_commitish: main
token: ${{ secrets.SQLFMT_RELEASE_TOKEN }}
body_path: CHANGELOG.md
files: |
LICENSE
dist/*sqlfmt*.whl
dist/*sqlfmt*.tar.gz
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm
push: true
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:v${{ steps.project_version.outputs.project_version }}