Skip to content

Updated heatmap (#750) #63

Updated heatmap (#750)

Updated heatmap (#750) #63

Workflow file for this run

name: graspologic Publish
on:
push:
paths-ignore:
- '.all-contributorsrc'
- 'CONTRIBUTORS.md'
branches:
- 'main'
- 'dev'
jobs:
build:
uses: ./.github/workflows/build.yml
publish:
runs-on: ubuntu-latest
needs: build
if: github.ref=='refs/heads/main' || github.ref=='refs/heads/dev'
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel twine
pip install -r requirements.txt
- name: Create version environment variable
run: |
echo "GRASPOLOGIC_VERSION=`python setup.py --version`" >> $GITHUB_ENV
echo "GRASPOLOGIC_TAG=v`python setup.py --version`" >> $GITHUB_ENV
- name: Build Release with setuptools
if: github.ref=='refs/heads/main'
run: |
python setup.py sdist
- name: Build Prerelease with setuptools
if: github.ref=='refs/heads/dev'
run: |
python setup.py egg_info -b "dev$GITHUB_RUN_ID" sdist
- name: Publish with twine
if: github.ref=='refs/heads/main' || github.ref=='refs/heads/dev'
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload dist/*
- name: Download documentation artifact
uses: actions/download-artifact@v2
with:
name: documentation-site
path: docs/documentation-site
- name: Publish reference docs (dev branch)
uses: peaceiris/actions-gh-pages@v3
if: github.ref=='refs/heads/dev'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/documentation-site
destination_dir: pre-release
- name: Publish reference docs (main branch)
uses: peaceiris/actions-gh-pages@v3
if: github.ref=='refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/documentation-site
destination_dir: ${{ env.GRASPOLOGIC_VERSION }}
- name: Publish latest reference docs (main branch)
uses: peaceiris/actions-gh-pages@v3
if: github.ref=='refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/documentation-site
destination_dir: latest
- name: Create tag and GitHub release
uses: ncipollo/release-action@v1
if: github.ref=='refs/heads/main'
with:
tag: ${{ env.GRASPOLOGIC_TAG }}
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: versions_at_release.txt