update version on docs/source/conf.py #20
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: π Build & Publish | |
on: | |
push: | |
tags: | |
- 'v\d+\.\d+\.[0-9a-z]+' # e.g. v1.0.0 or v20.15.10b5 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
cache: 'pip' # caching pip dependencies | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install build | |
- name: Build artifacts | |
run: | | |
python -m build | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheelstorage | |
path: ./dist/* | |
if-no-files-found: error | |
retention-days: 30 | |
publish: | |
needs: build | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/fontbakery | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
contents: write # Required by 'action-gh-release' | |
steps: | |
- name: Get date & flat tag | |
id: date_tag | |
run: | | |
export DATE=$(TZ=US/Pacific date +'%Y-%m-%d') | |
echo $DATE | |
export FLAT_TAG=$(echo ${GITHUB_REF##*/} | sed 's/\.//g') | |
echo $FLAT_TAG | |
echo "TODAY=$DATE" >> "$GITHUB_OUTPUT" | |
echo "VERSION=$FLAT_TAG" >> "$GITHUB_OUTPUT" | |
shell: bash | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: wheelstorage | |
path: dist | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
- name: Create GitHub Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
body: '[Release Notes](https://github.com/googlefonts/fontbakery/blob/main/CHANGELOG.md#${{ steps.date_tag.outputs.VERSION }}---${{ steps.date_tag.outputs.TODAY }})' | |
prerelease: true | |
files: ./dist/*.tar.gz |