-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modernize the packaging of rechunker a bit (#138)
* keep the GHA updated * modernize PyPI GHA * use a more modern approach to packaging * add project formatter * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * I'm not sure if there is a better solution than copying the deps * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * test * remove pin * should the outputs be removed? * add outputs up to the same point as the current docs * beautify --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
d625b6d
commit ba7efc0
Showing
10 changed files
with
220 additions
and
217 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,11 @@ | ||
# See https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot | ||
|
||
version: 2 | ||
updates: | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
labels: | ||
- "Bot" |
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,23 +1,52 @@ | ||
--- | ||
name: Release | ||
name: Publish to PyPI | ||
|
||
on: [push] | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
release: | ||
packages: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install -U pip wheel setuptools twine | ||
- name: Build distributions | ||
run: python setup.py sdist bdist_wheel | ||
|
||
- name: Publish to PyPI | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Get tags | ||
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
shell: bash | ||
|
||
- name: Install build tools | ||
run: | | ||
python -m pip install --upgrade pip wheel setuptools setuptools_scm build twine | ||
shell: bash | ||
|
||
- name: Build binary wheel | ||
run: python -m build --sdist --wheel . --outdir dist | ||
|
||
- name: CheckFiles | ||
run: | | ||
ls dist | ||
shell: bash | ||
|
||
- name: Test wheels | ||
run: | | ||
cd dist && python -m pip install *.whl | ||
python -m twine check * | ||
shell: bash | ||
|
||
- name: Publish a Python distribution to PyPI | ||
if: success() && github.event_name == 'release' | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_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
Oops, something went wrong.