Add Bluesky and Mastodon to ids #235
Workflow file for this run
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: bump, build and release | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
include: | |
- python: python3 | |
pip: pip3 | |
- python: python2 | |
pip: pip | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Install npm dependencies | |
run: | | |
npm install buffer-shims | |
npm install --global rollup | |
- name: Install python dependencies | |
run: | | |
${{ matrix.pip }} install --user --upgrade pip | |
${{ matrix.pip }} --no-cache-dir install --user -e .[tests,docs] | |
- name: Show python dependencies | |
run: | | |
${{ matrix.python }} --version | |
${{ matrix.pip }} freeze | |
- name: Run tests | |
run: | | |
./run-tests.sh | |
bump: | |
needs: test | |
if: ${{ github.event_name == 'push' }} | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x | |
- name: Install bump2version | |
shell: bash | |
run: | | |
python -m pip install --upgrade pip | |
pip install bump2version | |
- name: Configure git | |
shell: bash | |
run: | | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
- name: Bump version | |
shell: bash | |
run: | | |
bump2version patch --tag --verbose | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} | |
tags: true | |
publish: | |
needs: bump | |
if: ${{ github.event_name == 'push' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Setup nodejs | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 10.14.0 | |
registry-url: "https://registry.npmjs.org" | |
- name: Install npm dependencies | |
run: | | |
npm install buffer-shims | |
npm install --global rollup | |
- name: Install python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel | |
pip install -e .[tests,docs] | |
- name: Show python dependencies | |
run: | | |
pip freeze | |
- name: Build package | |
run: | | |
mkdir clean-build | |
python setup.py sdist bdist_wheel --universal --dist-dir ./clean-build | |
- name: Publish package | |
uses: pypa/gh-action-pypi-publish@v1.3.1 | |
with: | |
verify_metadata: false | |
user: __token__ | |
password: ${{ secrets.pypi_password }} | |
packages_dir: clean-build/ | |
- name: Build npm package | |
run: | | |
npm install --dev | |
npm run build | |
- name: Publish npm package | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} |