Skip to content

Commit

Permalink
sys: Automate mkdocs version build
Browse files Browse the repository at this point in the history
  • Loading branch information
TEParsons committed Mar 31, 2024
1 parent f8193af commit 3654e12
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish to PyPI

on:
push:
tags:
- '*'

jobs:
build:
name: Build
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install packages
run: >-
python -m pip install build twine
- name: Get version from file
id: version
run: echo "version=$(cat version)" >> $GITHUB_OUTPUT
- name: Validate package versions
run: >-
test $GITHUB_REF == ${{ steps.version.outputs.version }}
- name: Build
run: >-
python -m build mkdocs
- name: Upload
run: >-
twine upload mkdocs/dist/* ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 3654e12

Please sign in to comment.