release #186
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: Publish release | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
release: | |
name: Release | |
if: ${{ startsWith(github.event.head_commit.message, 'release') }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- id: get-version | |
run: echo "::set-output name=version::$(echo ${{ github.head_ref }} | sed 's|prerelease/||')" | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18.x | |
- name: Install dependencies | |
run: npm install | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Install Python dependencies | |
run: python -m pip install dash[dev,testing] | |
- name: Build the components | |
run: | | |
npm run build | |
python setup.py sdist | |
- uses: JS-DevTools/npm-publish@v1 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: ${{ secrets.FLIT_USERNAME }} | |
password: ${{ secrets.FLIT_PASSWORD }} |