Skip to content

Commit

Permalink
upload to pypi--next step is to upload to conda-forge
Browse files Browse the repository at this point in the history
  • Loading branch information
AmeerArsala committed Sep 28, 2024
1 parent e6a2ef9 commit 5e8f75a
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Summary

## Checklist

- [ ] I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
- [ ] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
- [ ] I've updated the documentation accordingly.

11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
groups:
dependencies:
patterns:
- "*"

35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish

on:
push:
branches:
- main
release:
types: [created]

jobs:
publish:
name: "Publish release"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Pixi Python Project
uses: prefix-dev/[email protected]
with:
pixi-version: v0.28.2
cache: true
environments: dev # separate by spaces; only using the dev environment to build

- name: Install twine from conda-forge (globally as to not interfere)
run: pixi global install twine

- name: Build package
run: pixi run -e dev build

- name: Publish to PyPI
run: twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
4 changes: 2 additions & 2 deletions pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[project]
name = "ranx"
name = "ranlibx"
version = "0.0.1"
description = "Add a short description here"
authors = [{ name = "Ameer Arsala", email = "[email protected]" }]
Expand All @@ -21,12 +21,15 @@ ranx = "ranx.cli.main:app"
build-backend = "hatchling.build"
requires = ["hatchling"]

[tool.hatch.build.targets.wheel]
packages = ["ranx"] # account for discrepancy between ranlibx and ranx

[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["linux-64", "osx-arm64", "win-64"]

[tool.pixi.pypi-dependencies]
ranx = { path = ".", editable = true }
ranlibx = { path = ".", editable = true }

[tool.pixi.feature.devdeps.dependencies]
pytest = "*"
Expand Down

0 comments on commit 5e8f75a

Please sign in to comment.