Add support for pulling from http location. #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: [ main ] | |
tags: [ v* ] | |
pull_request: | |
branches: [ main ] | |
name: Publish package | |
jobs: | |
build: | |
name: Build distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.x" | |
- name: Install pypa/build | |
run: | | |
python -m pip install build | |
- name: Build a binary wheel and a source tarball | |
run: | | |
python -m build | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
if-no-files-found: error | |
name: python-artifacts | |
path: dist | |
# This assumes a PyPI Trusted Publisher has been configured for the `pyorderly` package. | |
# See https://docs.pypi.org/trusted-publishers/ for more details. | |
publish-to-pypi: | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
name: Publish Python distribution to PyPI | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/pyorderly | |
permissions: | |
# This permission is needed for the workflow to authenticate against PyPI | |
id-token: write | |
steps: | |
- name: Download the artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: python-artifacts | |
path: dist/ | |
- name: Publish distribution to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |