summaryrefslogtreecommitdiffstats
path: root/.github/workflows/release-python.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/release-python.yml')
-rw-r--r--.github/workflows/release-python.yml16
1 files changed, 9 insertions, 7 deletions
diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml
index 86dc0de..57f36e7 100644
--- a/.github/workflows/release-python.yml
+++ b/.github/workflows/release-python.yml
@@ -15,16 +15,18 @@ jobs:
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
+ container:
+ image: ghcr.io/igaw/linux-nvme/debian.python:latest
steps:
- - name: install libraries
- run: sudo apt-get install gcc pkg-config libjson-c-dev libssl-dev python3-dev
+ - uses: actions/checkout@v4
- - uses: actions/checkout@v3
+ - name: Allow workspace
+ run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Build sdist
run: pipx run build --sdist
- - uses: actions/upload-artifact@v3
+ - uses: actions/upload-artifact@v4
with:
path: dist/*.tar.gz
retention-days: 5
@@ -34,7 +36,7 @@ jobs:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- - uses: actions/download-artifact@v3
+ - uses: actions/download-artifact@v4
with:
name: artifact
path: dist
@@ -49,7 +51,7 @@ jobs:
upload_pypi:
needs: [build_sdist]
runs-on: ubuntu-latest
- if: startsWith(github.ref, 'refs/tags/v')
+ if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'linux-nvme/libnvme'
steps:
- name: Check if it is a release tag
id: check-tag
@@ -58,7 +60,7 @@ jobs:
echo ::set-output name=match::true
fi
- name: Download artifiact
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
if: steps.check-tag.outputs.match == 'true'
with:
name: artifact