Files
AareDAQ/.gitea/workflows/action.yaml
T
leonarski_f aa78da916b
Build and Publish / build (push) Successful in 22s
CI: Update
2025-05-20 18:03:45 +02:00

52 lines
1.3 KiB
YAML

name: Build and Publish
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set Up Python Environment
run: |
python3 -m venv venv # Create a virtual environment
source venv/bin/activate
pip install twine build
mkdir dist/
- name: Build the common wheel
run: |
source venv/bin/activate
cd common/
python -m build
mv dist/* ../dist
- name: Build the GUI wheel
run: |
source venv/bin/activate
cd gui/
python -m build
mv dist/* ../dist
- name: Build the DAQ wheel
run: |
source venv/bin/activate
cd daq/
python -m build
mv dist/* ../dist
- name: Upload Package to Gitea PyPI
if: startsWith(github.event.head_commit.message, 'RELEASE')
env:
TWINE_USERNAME: "__token__" # Username for Twine when using token-based auth
TWINE_PASSWORD: ${{ secrets.PIP_REPOSITORY_API_TOKEN }} # Use the secret for authentication
run: |
source venv/bin/activate
twine upload --repository-url https://gitea.psi.ch/api/packages/mx/pypi dist/*