Skip to content

Make Db2 dialect statement-cache compatible (#188) #50

Make Db2 dialect statement-cache compatible (#188)

Make Db2 dialect statement-cache compatible (#188) #50

name: Build and Publish IBM_DB_SA Package
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
tags:
- 'v*'
permissions:
contents: read
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
publish-pypi:
needs: build
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
environment: pypi
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish to PyPI with trusted publishing (OIDC)
uses: pypa/[email protected]
with:
# Use GitHub OIDC token to authenticate instead of password
# The action supports OIDC automatically when password is empty
# so leave password empty and it will use OIDC.
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: dist