rebuild with recent 'six' #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build and upload | |
on: [push, pull_request] | |
jobs: | |
build: | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: ['3.10'] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check-out repository | |
uses: actions/checkout@v4 | |
- name: Set up python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' # caching pip dependencies | |
- name: Install dependencies | |
run: | | |
pip install twine | |
pip install wheel | |
pip install setuptools | |
pip install six | |
pip install "pycifrw>=4.4.3" | |
- name: Build wheels | |
run: | | |
python setup.py sdist bdist_wheel | |
- name: Run tests | |
run: | | |
pip install numpy | |
python setup.py install | |
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: 0.0.0 | |
body: This is an alpha build of the diffpy.structure library (0.0.0) | |
- name: Checkout target repo | |
uses: actions/checkout@v4 | |
env: | |
REPO: easyScience/pypi | |
REPO_PATH: pypi | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.ES_TOKEN }} | |
repository: ${{ env.REPO }} | |
path: ${{ env.REPO_PATH }} | |
ref: "master" | |
- name: Copy index to new repo | |
env: | |
SOURCE: index.html | |
TARGET: pypi/diffpy-structure/ | |
run: cp ${{ env.SOURCE }} ${{ env.TARGET }} | |
- name: Push | |
shell: bash | |
env: | |
REPO_PATH: pypi | |
GIT_USERNAME: action | |
GIT_EMAIL: action@github.com | |
run: | | |
cd ${{ env.REPO_PATH }} | |
git config --local user.name "${{ env.GIT_USERNAME }}" | |
git config --local user.email "${{ env.GIT_EMAIL }}" | |
git add . | |
if [[ `git status --porcelain` ]]; then | |
git commit -m "Github Actions Automatically Built in `date +"%Y-%m-%d %H:%M"`" | |
git push | |
fi |