From 6203c069afef487829d923fde2e7d780c2ecd3a0 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 4 Oct 2024 01:53:40 +0900 Subject: [PATCH] [WIP] ci: Add PyPI release workflow This commit adds a GitHub Actions CI workflow that tests and builds the Kconfiglib Python package and publishes it to PyPI when a new release is published. Signed-off-by: Stephanos Ioannidis --- .github/workflows/release.yml | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..79cdea8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,39 @@ +name: Release + +on: + release: + types: [ published ] + +jobs: + test: + name: Test + uses: ./.github/workflows/test.yml + + package: + name: Package + uses: ./.github/workflows/package.yml + + release: + name: Release + environment: release + needs: [ test, package ] + runs-on: ubuntu-22.04 + + permissions: + contents: write + id-token: write + + steps: + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + path: dist + + - name: Upload release assets + uses: softprops/action-gh-release@v2 + with: + files: | + dist/*.whl + + - name: Publish package to PyPI + uses: pypa/gh-action-pypi-publish@release/v1