Skip to content

Commit 1b30daa

Browse files
committed
feat: github actions and update readme
1 parent 11a636a commit 1b30daa

File tree

2 files changed

+67
-9
lines changed

2 files changed

+67
-9
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
name: Build distribution 📦
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v6
15+
16+
- uses: actions/setup-python@v6
17+
with:
18+
python-version: "3.10"
19+
20+
- name: Install pypa/build
21+
run: pip install build
22+
23+
- name: Build a binary wheel and a source tarball
24+
run: python -m build
25+
26+
- uses: actions/upload-artifact@v5
27+
with:
28+
name: python-package-distributions
29+
path: dist/
30+
31+
publish-to-pypi:
32+
name: Publish Python 🐍 distribution 📦 to PyPI
33+
if: startsWith(github.ref, 'refs/tags/')
34+
needs: build
35+
runs-on: ubuntu-latest
36+
environment:
37+
name: pypi
38+
url: https://pypi.org/p/cssinj
39+
permissions:
40+
id-token: write
41+
steps:
42+
- uses: actions/download-artifact@v6
43+
with:
44+
name: python-package-distributions
45+
path: dist/
46+
- uses: pypa/gh-action-pypi-publish@release/v1
47+
48+
publish-to-testpypi:
49+
name: Publish Python 🐍 distribution 📦 to TestPyPI
50+
if: github.ref == 'refs/heads/main'
51+
needs: build
52+
runs-on: ubuntu-latest
53+
environment:
54+
name: testpypi
55+
url: https://test.pypi.org/p/cssinj
56+
permissions:
57+
id-token: write
58+
steps:
59+
- uses: actions/download-artifact@v6
60+
with:
61+
name: python-package-distributions
62+
path: dist/
63+
- uses: pypa/gh-action-pypi-publish@release/v1
64+
with:
65+
repository-url: https://test.pypi.org/legacy/

README.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,10 @@
2121
To install and set up **CSSINJ** from Source, run the following commands:
2222
2323
```bash
24-
git clone https://github.com/DonAsako/CSSinj.git
25-
cd CSSinj
26-
python3 -m venv venv
27-
source venv/bin/activate
28-
python3 -m pip install --upgrade pip
29-
python3 -m pip install --upgrade build
30-
python3 -m build
31-
python3 -m pip install .
24+
pip install cssinj
3225
```
3326
34-
Now you’re ready to use **CSSINJ**! 🎯
27+
Now you’re ready to use **CSSINJ**!
3528
3629
## Usage
3730

0 commit comments

Comments
 (0)