From 55a9cd81f8b06b2208727433f9fa73120459d045 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Sun, 23 Oct 2022 12:19:15 +0200 Subject: [PATCH 1/3] Create wheels with the build package --- .github/workflows/release.yml | 9 +++++---- .github/workflows/test.yml | 2 +- dev-requirements.txt | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e5d5ba16..e298f9bd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,14 +34,15 @@ jobs: with: python-version: "3.9" - - name: Install dependencies + - name: install build requirements run: | - pip install -r dev-requirements.txt + pip install build pip freeze - - name: Build distribution archives + - name: build release run: | - python setup.py sdist bdist_wheel + python -m build --sdist --wheel . + ls -l dist # This step is only run when a new tag is pushed # all previous steps always run in order to exercise them diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4dfca1ce..40ddffb8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -116,7 +116,7 @@ jobs: - name: Install repo2docker run: | - python setup.py bdist_wheel + python -m build --wheel . pip install dist/*.whl # add for mercurial tests diff --git a/dev-requirements.txt b/dev-requirements.txt index 57592762..245b425e 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,3 +1,4 @@ +build codecov conda-lock pre-commit @@ -5,4 +6,3 @@ pytest-cov pytest>=4.6 pyyaml requests_mock -wheel From 224633af93c2d471d69666115a7d4d3cdaf7c59f Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Sun, 23 Oct 2022 12:19:55 +0200 Subject: [PATCH 2/3] ci: upload built wheels as an artifact for ease of inspection --- .github/workflows/release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e298f9bd..4f158f6f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,6 +44,13 @@ jobs: python -m build --sdist --wheel . ls -l dist + # ref: https://github.com/actions/upload-artifact#readme + - uses: actions/upload-artifact@v3 + with: + name: repo2docker_service-${{ github.sha }} + path: "dist/*" + if-no-files-found: error + # This step is only run when a new tag is pushed # all previous steps always run in order to exercise them - name: Publish distribution to PyPI From f3284bfcd1ac44351391f6a72c0a11e4a7039a0c Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Mon, 31 Oct 2022 13:48:33 +0100 Subject: [PATCH 3/3] Apply suggestions from code review --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4f158f6f..6f1b274e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,7 +47,7 @@ jobs: # ref: https://github.com/actions/upload-artifact#readme - uses: actions/upload-artifact@v3 with: - name: repo2docker_service-${{ github.sha }} + name: repo2docker-${{ github.sha }} path: "dist/*" if-no-files-found: error