Skip to content

Merge pull request #2 from larpix/2x2_format #25

Merge pull request #2 from larpix/2x2_format

Merge pull request #2 from larpix/2x2_format #25

Workflow file for this run

# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: Upload to PyPI (test)
on:
push:
branches: [ main ]
tags: [ '*' ]
pull_request:
branches: [ main ]
workflow_dispatch: {}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel twine build
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.TEST_PYPI_API_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
run: |
# Fake a version number so that we can always upload to test-pypi
date +%Y%m%d.%H%M%S > VERSION
cat VERSION
python -m build -w -s
python -m twine upload --repository testpypi dist/*