Skip to content

ci: Add branch filter for 'main' in publish workflow #4

ci: Add branch filter for 'main' in publish workflow

ci: Add branch filter for 'main' in publish workflow #4

Workflow file for this run

name: Publish
on:
push:
tags:
- "v*.*.*"
branches:
- "main"
jobs:
pypi-publish:
name: Publish release to PyPI
runs-on: ubuntu-latest
environment:
name: publish
url: https://pypi.org/p/licitpy
permissions:
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Poetry
uses: snok/[email protected]
with:
version: 1.8.3
- name: Install dependencies
run: poetry install --no-root
- name: Build package
run: |
poetry build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1