Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add versioned artifact build action #373

Merged
merged 2 commits into from
Feb 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 41 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,43 @@ 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
retention-days: 90
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz
if-no-files-found: error
retention-days: 90
Loading