-
Notifications
You must be signed in to change notification settings - Fork 6
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
8 changed files
with
130 additions
and
84 deletions.
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,8 @@ | ||
set -euo pipefail | ||
|
||
echo "Ensuring pip is up to date" | ||
python -m pip install --upgrade pip | ||
echo "Installing the latest version of pypa/build" | ||
pip install build | ||
|
||
python -m build --sdist --wheel --outdir dist/ . |
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,8 @@ | ||
name: "Build Python package" | ||
description: "Build a wheel and sdist for the package" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: "Build wheel" | ||
run: "$GITHUB_ACTION_PATH/action.sh" | ||
shell: "bash" |
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,12 +1,16 @@ | ||
name: "Verify Python Wheel" | ||
description: "Build a wheel for the package and importing the package doesn't cause an error" | ||
description: "Verify importing the package doesn't cause an error" | ||
inputs: | ||
package-import-name: | ||
description: "Name used to import the package from python code" | ||
required: true | ||
packages-dir: | ||
description: The target directory for distribution | ||
required: false | ||
default: dist | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: "Verify wheel" | ||
run: "$GITHUB_ACTION_PATH/action.sh ${{ inputs.package-import-name }}" | ||
run: "$GITHUB_ACTION_PATH/action.sh ${{ inputs.package-import-name }} ${{ inputs.packages-dir }}" | ||
shell: "bash" |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Publish Release | ||
env: | ||
PYTHON_VERSION: "3.9" | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
build-and-publish-wheel-to-pypi: | ||
runs-on: "ubuntu-latest" | ||
environment: "Publish Release" | ||
steps: | ||
- name: "Check out code" | ||
uses: "actions/checkout@v2" | ||
|
||
- uses: "actions/setup-python@v2" | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: "Build wheel" | ||
uses: "./.github/actions/build-dist" | ||
|
||
# v1.4.2 release. Using full SHA for security | ||
# https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions | ||
- name: "Publish distribution 📦 to PyPI" | ||
uses: "pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29" | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
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,3 +1,4 @@ | ||
__version__ = "0.1.0" | ||
|
||
from little_cheesemonger._errors import LittleCheesemongerError # noqa | ||
from little_cheesemonger._run import run # noqa | ||
|
||
__version__ = "0.1.0rc0" |
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