Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .github/workflows/libnvme-release-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ jobs:
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: Configure git identity for CI
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"

- name: Compute dev version from git
id: version
run: |
Expand All @@ -67,11 +72,18 @@ jobs:
echo "dev_version=$VERSION" >> $GITHUB_OUTPUT
echo "Computed dev version: $VERSION"

- name: Build sdist
- name: Patch project version in meson.build
env:
MESONPY_PROJECT_VERSION: ${{ steps.version.outputs.dev_version }}
DEV_VERSION: ${{ steps.version.outputs.dev_version }}
run: |
pipx run build --sdist
sed -i -e "/^project(/,/)/ s/^\(\s*\)version:\s*.*/\1version: '${DEV_VERSION}',/" meson.build

- name: Commit CI version bump
env:
DEV_VERSION: ${{ steps.version.outputs.dev_version }}
run: |
git add meson.build
git commit -m "ci: set project version to ${DEV_VERSION}"

- name: Validate sdist
run: |
Expand Down
Loading