Skip to content

Still trying to get GitHub actions to work #4

Still trying to get GitHub actions to work

Still trying to get GitHub actions to work #4

Workflow file for this run

name: Build and Publish ASMX to PyPI
on:
push:
# Release tags go to PyPI
tags:
- 'release-*'
branches:
- main
jobs:
build-and-publish:
name: Build and Publish
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install build tools
run: |
python -m pip install --upgrade pip build
- name: Build the package
run: python -m build
- name: Publish to PyPI or TestPyPI
uses: pypa/gh-action-pypi-publish@v1.8.8
with:
password: ${{ startsWith(github.ref, 'refs/tags/release-') && secrets.PYPI_API_TOKEN || secrets.TEST_PYPI_API_TOKEN }}
repository-url: ${{ startsWith(github.ref, 'refs/tags/release-') && 'https://upload.pypi.org/legacy/' || 'https://test.pypi.org/legacy/' }}