Skip to content

Merge pull request #240 from ThePorgs/dev #17

Merge pull request #240 from ThePorgs/dev

Merge pull request #240 from ThePorgs/dev #17

name: Release
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
test:
name: Python tests and checks
uses: ./.github/workflows/sub_testing.yml
build-n-publish:
name: Build and publish Python 🐍 distributions to PyPI 📦
runs-on: ubuntu-latest
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
needs: test
steps:
- uses: actions/checkout@main
with:
submodules: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install requirements
run: python -m pip install --user build virtualenv setuptools
- name: Run package unitest
run : python setup.py clean
- name: Build Exegol release
run: python -m build --sdist --outdir dist/ .
- name: Create testing venv
run: python -m venv vtest
- name: Install pip package locally
run: ./vtest/bin/pip install ./dist/*
#- name: Publish distribution 📦 to Test PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository-url: https://test.pypi.org/legacy/
# skip-existing: true
- name: Publish distribution 📦 to PyPI (prod)
uses: pypa/gh-action-pypi-publish@release/v1