Skip to content

Update publish.yaml #11

Update publish.yaml

Update publish.yaml #11

Workflow file for this run

name: Publish
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: "ubuntu-latest"
environment: production
permissions:
id-token: write
steps:
- uses: "actions/checkout@v4"
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run package creation
run: |
python -m pip install --user --upgrade build
python -m build
- name: Archive package
uses: actions/upload-artifact@v4
with:
name: pylitejet
path: dist
- name: Publish a Python distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1