-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
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 |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# SPDX-FileCopyrightText: 2023-present Rich FitzJohn <r.fitzjohn@imperial.ac.uk> | ||
# | ||
# SPDX-License-Identifier: MIT | ||
__version__ = "0.0.1" | ||
__version__ = "0.1.0" | ||
__name__ = "pyorderly" |
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