Skip to content

Commit

Permalink
ci: add versioned artifact build action
Browse files Browse the repository at this point in the history
This adds a versioned code artifact to the ci pipeline that can be used during other actions and in Github releases.

Closes #369
Co-authored-by: Dave Bunten <[email protected]>
  • Loading branch information
kenibrewer authored Feb 21, 2024
1 parent cfd0852 commit 014bfca
Showing 1 changed file with 39 additions and 2 deletions.
41 changes: 39 additions & 2 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4
with:
# Full history likely required for planned commitizen checks
# See #345
# Full history required for branch-based pre-commit checks
fetch-depth: 0
- name: Setup python, and check pre-commit cache
uses: ./.github/actions/setup-env
Expand Down Expand Up @@ -105,3 +104,41 @@ jobs:
# For every other version and/or OS, run pytest without coverage
if: (matrix.os != 'ubuntu-latest') || (matrix.python-version != env.TARGET_PYTHON_VERSION )
run: poetry run pytest ${{ github.event.inputs.pytest_addopts }}
build:
name: Build versioned package
# This job is used to build the package and upload the artifacts to GitHub Actions workflow results.
# See https://github.com/actions/upload-artifact?tab=readme-ov-file#where-does-the-upload-go
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get_version.outputs.version }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup python, and load cache
uses: ./.github/actions/setup-env
with:
python-version: ${{ env.TARGET_PYTHON_VERSION }}
cache-pre-commit: false
cache-venv: true
setup-poetry: true
install-deps: true
- name: Build
run: poetry build
- name: Get pycytominer version
id: get_version
run: |
echo "version=$(poetry version | cut -d' ' -f2 )" >> "$GITHUB_OUTPUT"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: wheel
path: dist/*.whl
if-no-files-found: error
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz
if-no-files-found: error

0 comments on commit 014bfca

Please sign in to comment.