Skip to content

feat: Multiple ETL refinements and fixes #446

feat: Multiple ETL refinements and fixes

feat: Multiple ETL refinements and fixes #446

Workflow file for this run

name: CD
on:
workflow_dispatch:
pull_request:
paths:
- "src/ca_biositing/datamodels/**"
- "src/ca_biositing/pipeline/**"
- "src/ca_biositing/webservice/**"
- ".github/workflows/cd.yml"
push:
branches:
- main
paths:
- "src/ca_biositing/datamodels/**"
- "src/ca_biositing/pipeline/**"
- "src/ca_biositing/webservice/**"
- ".github/workflows/cd.yml"
release:
types:
- published
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
FORCE_COLOR: 3
jobs:
dist:
name: Distribution build (${{ matrix.package }})
runs-on: ubuntu-latest
strategy:
matrix:
package: [datamodels, pipeline, webservice]
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Build and inspect ${{ matrix.package }} package
uses: hynek/build-and-inspect-python-package@v2
with:
path: src/ca_biositing/${{ matrix.package }}
upload-name-suffix: -${{ matrix.package }}
env:
# Strip the +gHASH local segment so dev versions like
# 0.2.0.dev4 are valid on TestPyPI/PyPI.
# Tagged releases produce clean versions (e.g. 0.2.0)
# and are unaffected.
HATCH_VCS_LOCAL_SCHEME: no-local-version
publish-testpypi:
needs: [dist]
name: Publish ${{ matrix.package }} to TestPyPI
environment: testpypi
permissions:
id-token: write
runs-on: ubuntu-latest
if: >-
github.event_name == 'push' || github.event_name == 'pull_request' ||
github.event_name == 'workflow_dispatch'
strategy:
fail-fast: false
matrix:
package: [datamodels, pipeline, webservice]
steps:
- uses: actions/download-artifact@v4
with:
name: Packages-${{ matrix.package }}
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
publish-pypi:
needs: [dist]
name: Publish ${{ matrix.package }} to PyPI
environment: pypi
permissions:
id-token: write
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
strategy:
fail-fast: false
matrix:
package: [datamodels, pipeline, webservice]
steps:
- uses: actions/download-artifact@v4
with:
name: Packages-${{ matrix.package }}
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1