Skip to content

feat: qualify state inj path for deferral to proj root if not absolute #47

feat: qualify state inj path for deferral to proj root if not absolute

feat: qualify state inj path for deferral to proj root if not absolute #47

Workflow file for this run

name: Release
on:
push:
branches:
- main
- master
jobs:
release:
if: github.repository == 'z3z1ma/dbt-core-interface'
name: Release
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/[email protected]
with:
fetch-depth: 2
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.7.18"
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Check if there is a parent commit
id: check-parent-commit
run: |
echo "sha=$(git rev-parse --verify --quiet HEAD^)" >> "$GITHUB_OUTPUT"
- name: Detect and tag new version
id: check-version
if: steps.check-parent-commit.outputs.sha
uses: salsify/[email protected]
with:
version-command: |
bash -o pipefail -c "grep '^version =' pyproject.toml | sed -E 's/version = \"(.+)\"/\1/'"
- name: Bump version for developmental release
if: "! steps.check-version.outputs.tag"
run: |
current_version=$(grep '^version =' pyproject.toml | sed -E 's/version = \"(.+)\"/\1/')
new_version="${current_version}.dev.$(date +%s)"
sed -i "s/^version = \".*\"/version = \"$new_version\"/" pyproject.toml
- name: Build package with uv
run: uv build
- name: Publish package on PyPI
if: steps.check-version.outputs.tag
run: uv publish
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
- name: Publish package on TestPyPI
if: "! steps.check-version.outputs.tag"
run: uv publish
env:
UV_PUBLISH_TOKEN: ${{ secrets.TEST_PYPI_TOKEN }}
UV_PUBLISH_INDEX: testpypi
- name: Publish the release notes
uses: release-drafter/[email protected]
with:
publish: ${{ steps.check-version.outputs.tag != '' }}
tag: ${{ steps.check-version.outputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}