Merge pull request #1 from js-808/fix-soup-get-attributes #6
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: Release | |
on: | |
workflow_dispatch: | |
push: | |
jobs: | |
# Tag and create a new release - handled by semantic-release | |
tag: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Create Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: npx semantic-release | |
# Package and upload to PyPI | |
pypi: | |
runs-on: ubuntu-latest | |
needs: tag # Need to get the latest version number, which may change based on semantic-release | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip sdist wheel | |
pip install -r requirements.txt | |
- name: Get Version Number | |
uses: oprypin/find-latest-tag@v1 | |
id: tag | |
with: | |
repository: ${{ github.repository }} | |
releases-only: true | |
- name: Build PyPI Package | |
run: | | |
python setup.py sdist bdist_wheel | |
env: | |
SEMANTIC_VERSION: ${{ steps.tag.outputs.tag }} | |
- name: PyPI Publish | |
uses: pypa/gh-action-pypi-publish@v1.4.2 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |