Skip to content

switch to tag-based releases #3

switch to tag-based releases

switch to tag-based releases #3

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
paths-ignore:
- "README.md"
tags:
- "v*.*"
pull_request:
branches: [ master ]
jobs:
lint:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Lint
run: make lint CHECK=1
tests:
runs-on: ubuntu-24.04
services:
postgres:
image: postgres:18
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
E2E_PG_HOST: 127.0.0.1
E2E_PG_PORT: 5432
E2E_PG_USER: postgres
E2E_PG_PASSWORD: postgres
E2E_PG_DB: postgres
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y postgresql-client
make install-test
- name: Run tests
run: make test
release:
needs: tests
runs-on: ubuntu-24.04
environment:
name: pypi
url: https://pypi.org/p/postgresql-proxy
permissions:
id-token: write
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Build release
run: make dist
- name: List artifacts
run: ls -lah dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1