From 74470dcc77a299ada64132317ad6e80d96c4ad35 Mon Sep 17 00:00:00 2001 From: Leif Denby Date: Tue, 20 Aug 2024 14:37:44 +0200 Subject: [PATCH 1/2] add package build and upload to pypi in cicd --- .github/workflows/ci-pypi-deploy.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/ci-pypi-deploy.yml diff --git a/.github/workflows/ci-pypi-deploy.yml b/.github/workflows/ci-pypi-deploy.yml new file mode 100644 index 00000000..00f31013 --- /dev/null +++ b/.github/workflows/ci-pypi-deploy.yml @@ -0,0 +1,24 @@ +name: package-release + +on: + workflow_dispatch: + pull_request: + push: + branches: + - main + release: + types: + - published + +jobs: + build: + name: build and upload release to pypi + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - uses: casperdcl/deploy-pypi@v2 + with: + password: ${{ secrets.PYPI_TOKEN }} + pip: wheel -w dist/ --no-deps . + upload: ${{ github.event_name == 'release' && github.event.action == 'published' }} From 6fb2a9112249cdf64e6161ed77f86ebb4405d2e5 Mon Sep 17 00:00:00 2001 From: Leif Denby Date: Tue, 20 Aug 2024 14:47:58 +0200 Subject: [PATCH 2/2] add reference to README --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index d66c0087..e8567fcf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,6 +7,7 @@ authors = [ {name = "Simon Adamov", email = "Simon.Adamov@meteoswiss.ch"}, {name = "Leif Denby", email = "lcd@dmi.dk"}, ] +readme = "README.md" # PEP 621 project metadata # See https://www.python.org/dev/peps/pep-0621/