Skip to content

Commit 54ca339

Browse files
authored
Initial work for release (#142)
* Update pyproject.toml * Remove old gif of cli usage for now * Initial work on publish workflow
1 parent 5031c25 commit 54ca339

File tree

3 files changed

+82
-20
lines changed

3 files changed

+82
-20
lines changed

Diff for: .github/workflows/publish.yaml

+42-17
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,52 @@ on:
55
push:
66
tags: v[0-9]+.[0-9]+.[0-9]+
77

8+
workflow_dispatch:
9+
10+
11+
812
jobs:
13+
build:
14+
name: Build distribution
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
- name: Setup Python
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: '3.9'
24+
- name: Install pypa/build
25+
run: python3 -m pip install build --user
26+
- name: Build a binary wheel and a source tarball
27+
run: python3 -m build
28+
- name: Store the distribution packages
29+
uses: actions/upload-artifact@v3
30+
with:
31+
name: python-package-distributions
32+
path: dist/
33+
34+
# TODO: Add logic to do github release too here
35+
936
publish:
37+
name: Publish to TestPyPI
1038
runs-on: ubuntu-latest
39+
environment:
40+
# name: pypi
41+
name: testpypi
42+
url: https://pypi.org/project/pyscript
43+
permissions:
44+
id-token: ${{ secrets.PYPI_TOKEN }}
1145

1246
steps:
13-
- name: Check out repository
14-
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
15-
- name: Set up python 3.9
16-
uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4
47+
- name: Download all the dists
48+
uses: actions/download-artifacts@v3
1749
with:
18-
python-version: 3.9
19-
- name: Install Poetry
20-
uses: snok/[email protected]
50+
name: python-package-distributions
51+
path: dist/
52+
- name: Publish release to PyPI
53+
uses: pypa/gh-action-pypi-publish@release/v1
54+
# This is for testing
2155
with:
22-
virtualenvs-create: true
23-
virtualenvs-in-project: true
24-
- name: Install package dependencies
25-
run: poetry install --no-dev
26-
- name: Build package
27-
run: poetry build
28-
- name: Publish package
29-
run: |
30-
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
31-
poetry publish
56+
repository-url: https://test.pypi.org/legacy/

Diff for: README.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,24 @@ A command-line interface for [PyScript](https://pyscript.net).
1111

1212
Quickly wrap Python scripts into a HTML template, pre-configured with [PyScript](https://pyscript.net).
1313

14-
<img src="https://user-images.githubusercontent.com/11037737/166966219-9440c3cc-e911-4730-882c-2ab9fa47147f.gif" style="width: 100%; max-width: 680px;" />
14+
```bash
15+
❯ pyscript
16+
17+
Usage: pyscript [OPTIONS] COMMAND [ARGS]...
18+
19+
Command Line Interface for PyScript.
20+
21+
╭─ Options ──────────────────────────────────────────────────────────────────────────────────────╮
22+
│ --version Show project version and exit. │
23+
│ --help Show this message and exit. │
24+
╰────────────────────────────────────────────────────────────────────────────────────────────────╯
25+
╭─ Commands ─────────────────────────────────────────────────────────────────────────────────────╮
26+
│ create Create a new pyscript project with the passed in name, creating a new directory in the │
27+
│ current directory. Alternatively, use `--wrap` so as to embed a python file instead. │
28+
│ run Creates a local server to run the app on the path and port specified. │
29+
╰────────────────────────────────────────────────────────────────────────────────────────────────╯
30+
31+
```
1532

1633
## Installation
1734

Diff for: pyproject.toml

+22-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,20 @@ requires = ["setuptools", "setuptools-scm"]
66
authors = [
77
{name = "Matt Kramer", email = "[email protected]"},
88
{name = "Fabio Pliger", email = "[email protected]"},
9-
{name = "Nicholas Tollervey", email = "[email protected]"}
9+
{name = "Nicholas Tollervey", email = "[email protected]"},
10+
{name = "Fabio Rosado", email = "[email protected]"}
11+
]
12+
classifiers = [
13+
"Development Status :: 4 - Beta",
14+
"Environment :: Console",
15+
"Intended Audience :: Developers",
16+
"License :: OSI Approved :: Apache Software License",
17+
"Programming Language :: Python :: 3",
18+
"Programming Language :: Python :: 3.9",
19+
"Programming Language :: Python :: 3.10",
20+
"Topic :: Software Development :: Code Generators",
21+
"Topic :: Software Development :: Libraries :: Python Modules",
22+
"Topic :: Software Development :: Pre-processors"
1023
]
1124
dependencies = [
1225
'importlib-metadata; python_version<"3.8"',
@@ -19,11 +32,12 @@ dependencies = [
1932
"requests<=2.31.0"
2033
]
2134
description = "Command Line Interface for PyScript"
35+
keywords = ["pyscript", "cli", "pyodide", "micropython", "pyscript-cli"]
2236
license = {text = "Apache-2.0"}
2337
name = "pyscript"
2438
readme = "README.md"
2539
requires-python = ">=3.9"
26-
version = "0.2.5"
40+
version = "0.3.0"
2741

2842
[project.optional-dependencies]
2943
dev = [
@@ -43,3 +57,9 @@ docs = [
4357

4458
[project.scripts]
4559
pyscript = "pyscript.cli:app"
60+
61+
[project.urls]
62+
Documentation = "https://docs.pyscript.net"
63+
Examples = "https://pyscript.com/@examples"
64+
Homepage = "https://pyscript.net"
65+
Repository = "https://github.com/pyscript/pyscript-cli"

0 commit comments

Comments
 (0)