Release version 0.2.1 #5
Workflow file for this run
This file contains hidden or 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 Wheel" | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| permissions: | |
| contents: read | |
| jobs: | |
| pypi-publish: | |
| name: Upload release to PyPI | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/project/matplotlib-inline | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.x' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build | |
| - name: Build package | |
| run: python -m build | |
| - name: Install built wheel | |
| run: pip install dist/*.whl | |
| - name: Echo current tag | |
| run: echo ${{ github.ref }} | |
| - name: Get package version | |
| run: | | |
| PACKAGE_VERSION=$(python -c 'import matplotlib_inline; print(matplotlib_inline.__version__)') | |
| echo "Package version: $PACKAGE_VERSION" | |
| - name: Check tag and package version match | |
| run: | | |
| if [ "$GITHUB_REF" != "refs/tags/$PACKAGE_VERSION" ]; then | |
| echo "Tag and package version do not match. Aborting." | |
| exit 1 | |
| fi | |
| - name: Publish package | |
| uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e | |