Skip to content

Commit d698c1f

Browse files
author
Nathan Hammond
committed
save python package to artifacts
1 parent b9efea2 commit d698c1f

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

.github/reusable/docker_build_and_push/action.yml renamed to .github/reusable/build_and_push_artifacts/action.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,9 @@ runs:
1818
platforms: linux/amd64
1919
tags: ghcr.io/${{ github.repository }}:${{ env.REF_NAME }}
2020
build-args: |
21-
REF_NAME=${{ env.REF_NAME }}
21+
REF_NAME=${{ env.REF_NAME }}
22+
- name: Store the distribution packages
23+
uses: actions/upload-artifact@v4
24+
with:
25+
name: python-package-distributions
26+
path: dist/

.github/reusable/install_and_test/action.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,19 @@ runs:
1010
shell: bash
1111
run: |
1212
python3 -m pip install .[dev]
13-
pip-compile
13+
python3 -m piptools compile
14+
- name: Build a binary wheel and a source tarball
15+
shell: bash
16+
run: python3 -m build
1417
- name: Install package via pip
1518
shell: bash
16-
run: |
17-
python3 -m pip install .
19+
run: pip install dist/*.whl
1820
- name: Test pip installed version with unittest
1921
shell: bash
20-
run: |
21-
python3 -m unittest discover
22+
run: python3 -m unittest discover
2223
- name: Install package via conda
2324
shell: bash
24-
run: |
25-
$CONDA/bin/conda env update --file environment.yml --name base
25+
run: $CONDA/bin/conda env update --file environment.yml --name base
2626
- name: Test Conda installed version with unittest
2727
shell: bash
28-
run: |
29-
$CONDA/bin/python3 -m unittest discover
28+
run: $CONDA/bin/python3 -m unittest discover

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v4
2020
- uses: ./.github/reusable/install_and_test
21-
- uses: ./.github/reusable/docker_build_and_push
21+
- uses: ./.github/reusable/build_and_push_artifacts
2222
release:
2323
name: Release pushed tag
24-
needs: build_and_test
24+
needs: build_and_testg
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: Create release

0 commit comments

Comments
 (0)