Skip to content

fix workflow file

fix workflow file #4

Workflow file for this run

name: publish
on:
push:
tags:
- "v*.*.*"
release:
types:
- published
jobs:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/flask_mab
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: '>=3.10'
- name: Set up build deps
run: python -m pip install --upgrade build
- name: Install dependencies
run: python -m pip install '.[dev]'
- name: Run tests
run: tox
- name: Set commit time to release time
run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV
- name: Build dist
run: python -m build .
- name: Build docs
uses: ammaraskar/[email protected]
with:
pre-build-command: python -m pip install '.[dev]'
docs-folder: "docs/"
build-command: sphinx-build -b html . _build
- name: Build Changelog
id: github_release
uses: mikepenz/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
uses: ncipollo/release-action@v1
with:
artifacts: >-
dist/*
artifactErrorsFailBuild: true
allowUpdates: true
body: ${{steps.github_release.outputs.changelog}}
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1