Skip to content

2.10.0

2.10.0 #18

Workflow file for this run

name: Release
on:
release:
types: [released]
concurrency:
group: release
cancel-in-progress: false
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
jobs:
release:
runs-on: ubuntu-latest
container:
image: danielflook/python-minifier-build:python3.12-2024-01-12
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set version statically
run: |
VERSION=${{ github.event.release.tag_name }}
sed -i "s/setup_requires=.*/version='$VERSION',/; s/use_scm_version=.*//" setup.py
- name: Build package
run: |
pip3 install --upgrade build
python3 -m build
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist/
if-no-files-found: error
- name: Build documentation
run: |
pip3 install sphinx sphinxcontrib-programoutput sphinx_rtd_theme
pip3 install dist/*.tar.gz
sphinx-build docs/source /tmp/build
- uses: actions/upload-pages-artifact@v1
with:
path: /tmp/build
publish-to-pypi:
needs: release
runs-on: ubuntu-latest
permissions:
id-token: write
environment:
name: pypi
url: https://pypi.org/project/python-minifier/${{ github.event.release.tag_name }}
steps:
- uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
print-hash: true
verbose: true
publish-docs:
needs: release
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2