Bump version to 0.31.1 #86
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: CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Build source package | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Building using setuptools | |
run: | | |
./setup.py sdist | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: packages | |
path: dist/xbstrap-*.tar.gz | |
deploy: | |
name: Publish release | |
runs-on: ubuntu-latest | |
if: "startsWith(github.ref, 'refs/tags/v')" | |
needs: build | |
steps: | |
- name: Fetch artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: packages | |
path: artifact | |
- name: Prepare dist/ directory | |
run: | | |
mkdir dist/ | |
# Get exactly the version that we want to publish. | |
version="$(grep -Po '(?<=^refs/tags/v).+$' <<< "$ref")" | |
mv "artifact/xbstrap-$version.tar.gz" dist/ | |
env: | |
ref: ${{ github.ref }} | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |