Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
gen740 committed Feb 3, 2023
1 parent 7f30ecb commit 5fd620e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
28 changes: 16 additions & 12 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,39 @@ name: Publish distributions to PyPI or TestPyPI

# TestPyPI upload is scheduled in each weekday.
# PyPI upload is only activated if the release is published.
# on:
# schedule:
# - cron: '0 15 * * *'
# release:
# types:
# - published

on:
schedule:
- cron: '0 15 * * *'
release:
types:
- published
push:
branches:
- main

jobs:
build-n-publish:
name: Build and publish Python distributions to PyPI or TestPyPI
runs-on: ubuntu-18.04
runs-on: ubuntu-latest

# Not intended for forks.
if: github.repository == 'gen740/pygen'

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
- name: Setup Python3.10
uses: actions/setup-python@v4
with:
python-version: 3.10
python-version: "3.10"

- name: Install twine
run: |
python -m pip install -U pip build
- name: Install Poetry
uses: snok/install-poetry@v1

- name: Build a tar ball
run: |
python -m build --sdist --wheel
poetry build
- name: Publish distribution to TestPyPI
# The following upload action cannot be executed in the forked repository.
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.pyright]
include = ["template"]
include = []

exclude = ["**/node_modules", "**/__pycache__"]

Expand All @@ -9,7 +9,7 @@ pythonVersion = "3.10"
pythonPlatform = "Darwin"

[tool.poetry]
name = "pybind11-pygen"
name = "pygen"
version = "0.1.0"
description = "A simple c++ code generator for pybind11"
readme = "README.md"
Expand All @@ -18,6 +18,8 @@ authors = ["Gen740 <[email protected]>"]
[tool.poetry.scripts]
pygen = 'pygen.__main__:run'

[tool.setuptools.packages.find]
where = ["."]

[tool.poetry.dependencies]
python = "^3.10"
Expand Down

0 comments on commit 5fd620e

Please sign in to comment.