mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2026-03-21 12:08:39 -06:00
58 lines
1.3 KiB
YAML
58 lines
1.3 KiB
YAML
---
|
|
name: Build Package
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
- develop
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
quality:
|
|
name: Code Quality
|
|
uses: ./.github/workflows/quality.yml
|
|
|
|
test:
|
|
name: Tests
|
|
uses: ./.github/workflows/run_tests.yml
|
|
|
|
build:
|
|
name: Build Distribution
|
|
runs-on: ubuntu-latest
|
|
needs: [quality, test]
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v5
|
|
with:
|
|
enable-cache: true
|
|
cache-dependency-glob: "pyproject.toml"
|
|
|
|
- name: Set up Python 3.12
|
|
run: uv python install 3.12
|
|
|
|
- name: Install dependencies
|
|
run: uv sync --dev
|
|
|
|
- name: Build package
|
|
run: uv build
|
|
|
|
- name: Upload build artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: dist-python-3.12
|
|
path: dist/
|
|
retention-days: 30
|
|
if-no-files-found: error
|
|
|
|
- name: Publish package distributions to PyPI
|
|
uses: pypa/gh-action-pypi-publish@release/v1.13
|