Adding upstream version 1.14.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
515eb29eee
commit
9ae445a706
1041 changed files with 6076 additions and 1170 deletions
35
.github/workflows/cleanup-python.yml
vendored
Normal file
35
.github/workflows/cleanup-python.yml
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
name: cleanup python
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
keep-last:
|
||||
description: "How many recent dev releases to keep"
|
||||
required: false
|
||||
default: "5"
|
||||
dry-run:
|
||||
description: "Only simulate the deletion (true/false)"
|
||||
required: false
|
||||
default: "true"
|
||||
|
||||
jobs:
|
||||
cleanup:
|
||||
runs-on: ubuntu-latest
|
||||
environment: pypi
|
||||
steps:
|
||||
- name: Install pypi-cleanup
|
||||
run: pip install pypi-cleanup
|
||||
|
||||
- name: Run pypi-cleanup on TestPyPI
|
||||
env:
|
||||
PYPI_USERNAME: __token__
|
||||
PYPI_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
||||
run: |
|
||||
pypi-cleanup \
|
||||
--username "$PYPI_USERNAME" \
|
||||
--password "$PYPI_PASSWORD" \
|
||||
--repository-url https://test.pypi.org/legacy/ \
|
||||
--package libnvme \
|
||||
--keep ${{ github.event.inputs.keep-last }} \
|
||||
--version-regex '.*\.dev[0-9]+' \
|
||||
$([ "${{ github.event.inputs.dry-run }}" == "true" ] && echo "--dry-run")
|
64
.github/workflows/release-python.yml
vendored
64
.github/workflows/release-python.yml
vendored
|
@ -7,6 +7,10 @@ on:
|
|||
tags:
|
||||
- '**'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: 'Tag to check out'
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
build_sdist:
|
||||
|
@ -20,28 +24,80 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Allow workspace
|
||||
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
run: |
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
|
||||
- name: Build sdist
|
||||
run: pipx run build --sdist
|
||||
run: |
|
||||
pipx run build --sdist
|
||||
|
||||
- name: Validate sdist
|
||||
run: |
|
||||
pipx run twine check dist/*.tar.gz
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: dist/*.tar.gz
|
||||
retention-days: 5
|
||||
|
||||
build_test_sdist:
|
||||
name: Build test source distribution
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
PYTHON_VERSION: "3.10"
|
||||
container:
|
||||
image: ghcr.io/linux-nvme/debian.python:latest
|
||||
steps:
|
||||
- name: Check out repository (with tags)
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # Required for `git describe`
|
||||
|
||||
- name: Allow workspace
|
||||
run: |
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
|
||||
- name: Compute dev version from git
|
||||
id: version
|
||||
run: |
|
||||
TAG=$(git describe --tags --abbrev=0)
|
||||
REV=$(git rev-list "$TAG"..HEAD --count)
|
||||
BASE_VERSION="${TAG#v}"
|
||||
VERSION="${BASE_VERSION}.dev${REV}"
|
||||
echo "dev_version=$VERSION" >> $GITHUB_OUTPUT
|
||||
echo "Computed dev version: $VERSION"
|
||||
|
||||
- name: Patch version in meson.build
|
||||
run: |
|
||||
sed -i -e "0,/[ \t]version: /s/\([ \t]version: \).*/\1\'${{ steps.version.outputs.dev_version }}\',/" meson.build
|
||||
|
||||
- name: Build sdist
|
||||
run: |
|
||||
pipx run build --sdist
|
||||
|
||||
- name: Validate sdist
|
||||
run: |
|
||||
pipx run twine check dist/*.tar.gz
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: test_pypi
|
||||
path: dist/*.tar.gz
|
||||
retention-days: 5
|
||||
|
||||
upload_test_pypi:
|
||||
needs: [build_sdist]
|
||||
needs: [build_test_sdist]
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
PYTHON_VERSION: "3.10"
|
||||
environment: pypi
|
||||
permissions:
|
||||
id-token: write
|
||||
if: github.repository == 'linux-nvme/libnvme'
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: artifact
|
||||
name: test_pypi
|
||||
path: dist
|
||||
|
||||
- name: Publish package to TestPyPI
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue