Skip to content

Workflow edits v2

Workflow edits v2 #26

Workflow file for this run

name: build and upload
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
strategy:
fail-fast: false
max-parallel: 4
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
permissions:
contents: write
pull-requests: write
repository-projects: write
steps:
- name: Check-out repository
uses: actions/checkout@v4
- name: Unshallow repository
run: git fetch --prune --unshallow
- name: Set up conda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
channels: conda-forge
python-version: ${{ matrix.python-version }}
activate-environment: tester
- name: Install dependencies
shell: bash -el {0}
run: |
conda install -c conda-forge twine
conda install -c conda-forge wheel
conda install -c conda-forge setuptools
conda install -c conda-forge pip
conda install -c conda-forge gsl
- name: Build wheels
shell: bash -el {0}
run: |
conda run python setup.py sdist bdist_wheel
- name: Run tests
shell: bash -el {0}
run: |
conda install -c conda-forge numpy
conda run python setup.py install
conda run python conda-recipe/run_test.py
- name: Upload Artifacts GitHub releases
uses: ncipollo/release-action@v1
with:
draft: false
prerelease: true
allowUpdates: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: ${{ github.workspace }}/dist/*.whl
tag: 1.4.1
body: This is an alpha build of the pdffit2 library (1.4.2)
# This step will upload tagged commits to pypi.
# The pypi token must be added to GH secrets
#
# - name: Publish package
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# password: ${{ secrets.PYPI_API_TOKEN }}