aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2024-03-23 21:55:06 +0200
committerArthur Zamarin <arthurzam@gentoo.org>2024-03-23 21:55:06 +0200
commita6413488d74735f9175bda9f6ed009a760b5c24f (patch)
treeceb893e5b2ad2930cfb058995a112a7a9a42e00c /.github
parentdrop bundling of tree-sitter-bash (diff)
downloadpkgcheck-a6413488d74735f9175bda9f6ed009a760b5c24f.tar.gz
pkgcheck-a6413488d74735f9175bda9f6ed009a760b5c24f.tar.bz2
pkgcheck-a6413488d74735f9175bda9f6ed009a760b5c24f.zip
use flit instead of setuptools
Since we don't need to build tree-sitter-bash lib, we became pure python package, where flit is much better suited for this task. This now also matches other packages under pkgcore stack. This simplifies a lot the release process, as we don't need to build the lib anymore using cibuildwheel. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/release.yml75
1 files changed, 19 insertions, 56 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index b229664f..b8be4db0 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -7,8 +7,15 @@ on:
workflow_dispatch:
jobs:
- build-sdist:
+ build-and-deploy:
runs-on: ubuntu-latest
+ environment: release
+
+ permissions:
+ id-token: write # Used to authenticate to PyPI via OIDC
+
+ contents: write # Used to authenticate github release publish
+
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -34,70 +41,26 @@ jobs:
make man
make sdist
+ - name: Build wheel
+ run: make wheel
+
- name: Output dist file info
run: |
+ sha512sum dist/*
tar -ztf dist/*.tar.gz | sort
- - name: Upload sdist artifact
- uses: actions/upload-artifact@v4
- with:
- name: dist-sdist
- path: dist/*.tar.gz
-
-
- build-wheel:
- runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- matrix:
- arch: [x86_64, aarch64]
-
- steps:
- - name: Checkout code
- uses: actions/checkout@v4
-
- - name: Set up QEMU
- uses: docker/setup-qemu-action@v3
- with:
- platforms: ${{matrix.arch}}
-
- - name: Build wheels
- uses: joerick/cibuildwheel@v2.16.5
- with:
- output-dir: dist
- env:
- CIBW_ARCHS_LINUX: ${{matrix.arch}}
-
- - name: Upload wheel artifacts
- uses: actions/upload-artifact@v4
- with:
- name: dist-wheel-${{matrix.arch}}
- path: dist/*.whl
-
-
- deploy:
- if: startsWith(github.ref, 'refs/tags/')
- needs: ["build-sdist", "build-wheel"]
- runs-on: ubuntu-latest
- environment: release
-
- permissions:
- id-token: write # Used to authenticate to PyPI via OIDC
-
- contents: write # Used to authenticate github release publish
-
- steps:
- - uses: actions/download-artifact@v4
+ - uses: actions/upload-artifact@v4
with:
- pattern: dist-*
- path: dist
- merge-multiple: true
+ name: results
+ path: dist/*
- - name: Publish a Python distribution to PyPI
+ - name: publish
uses: pypa/gh-action-pypi-publish@release/v1
+ if: startsWith(github.ref, 'refs/tags/')
- name: Create GitHub release
uses: softprops/action-gh-release@v1
+ if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/*.tar.gz
fail_on_unmatched_files: true
@@ -105,7 +68,7 @@ jobs:
build-and-push-docker-image:
if: startsWith(github.ref, 'refs/tags/')
- needs: ["deploy"]
+ needs: ["build-and-deploy"]
runs-on: ubuntu-latest
environment: release