Skip to content

[RFC] TooltipWrapper component #349

[RFC] TooltipWrapper component

[RFC] TooltipWrapper component #349

Workflow file for this run

name: Publish release
on:
pull_request:
types:
- closed
jobs:
release:
name: Release
if: ${{ github.event.pull_request.merged && startsWith(github.head_ref, 'release/') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GH_ACCESS_TOKEN_TOM }}
- id: get-version
run: echo "version=$(echo ${{ github.head_ref }} | sed 's|release/||')" >> "$GITHUB_OUTPUT"
- name: Use Node 16
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: Set up Python 3.12
uses: actions/setup-python@v1
with:
python-version: '3.12'
- name: Install Python dependencies
run: python -m pip install -r requirements-dev.txt
- name: Update docs requirements
run: invoke set-documentation-version ${{ steps.get-version.outputs.version }}
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
- name: Clean dist/
run: rm -rf dist/dash_bootstrap_components.min.js
- name: Build dash-bootstrap-components
run: python -m build --sdist --wheel --outdir dist/
- name: Publish to PyPI
uses: pypa/[email protected]
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Commit updated package-lock.json and docs requirements
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Release ${{ steps.get-version.outputs.version }}
branch: main
push_options: --force
file_pattern: package-lock.json docs/requirements.txt
- name: Create GitHub release
id: create-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get-version.outputs.version }}
release_name: Release ${{ steps.get-version.outputs.version }}
body: ${{ github.event.pull_request.body }}
prerelease: false
- name: Post-release cleanup
run: invoke postrelease ${{ steps.get-version.outputs.version }}
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Back to dev
branch: main
push_options: --force
file_pattern: package.json tests/test_version.py dash_bootstrap_components/_version.py
prerelease:
name: Prerelease
if: ${{ github.event.pull_request.merged && startsWith(github.head_ref, 'prerelease/') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GH_ACCESS_TOKEN_TOM }}
- id: get-version
run: echo "version=$(echo ${{ github.head_ref }} | sed 's|prerelease/||')" >> "$GITHUB_OUTPUT"
- name: Use Node 16
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: Set up Python 3.12
uses: actions/setup-python@v1
with:
python-version: '3.12'
- name: Install Python dependencies
run: python -m pip install -r requirements-dev.txt
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
- name: Clean dist/
run: rm -rf dist/dash_bootstrap_components.min.js
- name: Build dash-bootstrap-components
run: python -m build --sdist --wheel --outdir dist/
- name: Publish to PyPI
uses: pypa/[email protected]
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Commit updated package-lock.json
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Release ${{ steps.get-version.outputs.version }}
branch: main
push_options: --force
file_pattern: package-lock.json
- name: Create GitHub prerelease
id: create-prerelease
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get-version.outputs.version }}
release_name: Prerelease ${{ steps.get-version.outputs.version }}
body: ${{ github.event.pull_request.body }}
prerelease: true
- name: Post-release cleanup
run: invoke postrelease ${{ steps.get-version.outputs.version }}
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Back to dev
branch: main
push_options: --force
file_pattern: package.json tests/test_version.py dash_bootstrap_components/_version.py