8000 Fix release by madhur-tandon · Pull Request #152 · pyscript/pyscript-cli · GitHub
[go: up one dir, main page]

Skip to content

Fix release #152

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
version gatekeep while releasing
  • Loading branch information
madhur-tandon committed Aug 26, 2024
commit 431498040ffba3165ddf3ca1c327b152777d3e70
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release to PyPI

on:
push:
tags:
- '*'

jobs:
release:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/pyscript
permissions:
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11

- name: Install dependencies
run: pip install -r requirements.txt

- name: Build and package
run: |
pip install wheel
python setup.py sdist bdist_wheel

- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
65 changes: 0 additions & 65 deletions pyproject.toml

This file was deleted.

81 changes: 81 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import os
from setuptools import setup

def read_version():
with open("src/pyscript/version", "r") as f:
return f.read().strip("\n")

def check_tag_version():
tag = os.getenv("GITHUB_REF")
expected_version = read_version()
if tag != f"refs/tags/{expected_version}":
raise Exception(f"Tag '{tag}' does not match the expected "
f"version '{expected_version}'")

with open("README.md", "r") as fh:
long_description = fh.read()

check_tag_version()

setup(
name="pyscript",
version=read_version(),
description="Command Line Interface for PyScript",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/pyscript/pyscript-cli",
author="Matt Kramer, Fabio Pliger, Nicholas Tollervey, Fabio Rosado, Madhur Tandon",
author_email="mkramer@anaconda.com, fpliger@anaconda.com, ntollervey@anaconda.com, frosado@anaconda.com, mtandon@anaconda.com",
license="Apache-2.0",
install_requires=[
'importlib-metadata; python_version<"3.8"',
'Jinja2<3.2',
'pluggy<1.3',
'rich<=13.7.1',
'toml<0.11',
'typer<=0.9.0',
'platformdirs<4.3',
'requests<=2.31.0',
],
python_requires=">=3.9",
keywords=["pyscript", "cli", "pyodide", "micropython", "pyscript-cli"],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Topic :: Software Development :: Code Generators',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: Pre-processors',
],
extras_require={
"dev": [
"coverage<7.3",
"mypy<=1.4.1",
"pytest<7.5",
"types-toml<0.11",
"types-requests"
],
"docs": [
"Sphinx<5.2",
"sphinx-autobuild<2021.4.0",
"sphinx-autodoc-typehints<1.20",
"myst-parser<0.19.3",
"pydata-sphinx-theme<0.13.4"
]
},
entry_points={
'console_scripts': [
'pyscript = pyscript.cli:app',
],
},
project_urls={
'Documentation': 'https://docs.pyscript.net',
'Examples': 'https://pyscript.com/@examples',
'Homepage': 'https://pyscript.net',
'Repository': 'https://github.com/pyscript/pyscript-cli',
},
)
1 change: 1 addition & 0 deletions src/pyscript/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.3.0
0