37 lines
1.1 KiB
YAML
37 lines
1.1 KiB
YAML
name: StarFields Django Rest Framework Generics
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up Python
|
|
# This is the version of the action for setting up Python, not the Python version.
|
|
uses: https://github.com/actions/setup-python@v5
|
|
with:
|
|
# Semantic version range syntax or exact version of a Python version
|
|
python-version: '3.12.3'
|
|
|
|
- name: Display Python version
|
|
run: python -c "import sys; print(sys.version)"
|
|
|
|
# TODO testing
|
|
# check https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#packaging-workflow-data-as-artifacts
|
|
|
|
- name: Build package
|
|
run: python -m build
|
|
|
|
- name: Publish package to Gitea PyPI
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
with:
|
|
user: ${{ secrets.GIT_PYPI_USERNAME }}
|
|
password: ${{ secrets.GIT_PYPI_PASSWORD }}
|
|
repository-url: https://git.vickys-corner.xyz/api/packages/StarFields/pypi
|
|
print-hash: true
|