Skip to content

1.0.2

1.0.2 #11

Workflow file for this run

name: Publish release
on:
release:
types: [published]
jobs:
build:
name: Build dash-loading-spinners (components + js)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js 12
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install dependencies
run: npm ci
- name: Lint source
run: npm run lint
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install Dash
run: python -m pip install -r requirements-dev.txt
- name: Update version
run: invoke update-version $GITHUB_REF
- name: Build dash-loading-spinners
run: npm run build
- name: Upload generated files
uses: actions/upload-artifact@v2
with:
name: dash-loading-spinners
path: dash_loading_spinners
python-test:
name: Lint and test Python package
needs: build
runs-on: 'ubuntu-latest'
strategy:
max-parallel: 6
matrix:
python-version: [3.7, 3.8, 3.9, '3.10']
services:
hub:
image: selenium/hub:3.141.59-gold
firefox:
image: selenium/node-chrome:3.141.59-gold
env:
HUB_HOST: hub
HUB_PORT: 4444
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Set up Python ${{ matrix.python-version }}
if: matrix.python-version != '3.9'
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install nox
run: python3.9 -m pip install -U nox
- name: Lint Python source
if: matrix.python-version == 3.9
run: nox -s lint
- uses: actions/download-artifact@v2
with:
name: dash-loading-spinners
path: dash_loading_spinners
- name: Test Python module
run: nox -s test-${{ matrix.python-version }}
publish:
name: Publish dash-loading-spinners to TestPyPI, PyPI and NPM
runs-on: ubuntu-latest
needs: python-test
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: dash-loading-spinners
path: dash_loading_spinners
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.txt
- name: Update version
run: invoke update-version $GITHUB_REF
- name: Build package
run: python -m build --sdist --wheel --outdir dist/
- name: Publish dash-loading-spinners to TestPyPI
uses: pypa/gh-action-pypi-publish@v1.4.2
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish dash-loading-spinners to PyPI
uses: pypa/gh-action-pypi-publish@v1.4.2
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Publish dash-loading-spinners to NPM
run: |
npm ci
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}