Skip to content

Commit 8663c71

Browse files
committed
[TASK] project stub: stay tuned
1 parent 2b63ef2 commit 8663c71

File tree

5 files changed

+137
-1
lines changed

5 files changed

+137
-1
lines changed

.github/workflows/pypi-publish.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: Publish pamila to PyPI and TestPyPI
2+
3+
on: push
4+
5+
jobs:
6+
build:
7+
name: Build distribution
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Set up Python
13+
uses: actions/setup-python@v5
14+
with:
15+
python-version: "3.x"
16+
- name: Install pypa/build
17+
run: python3 -m pip install build --user
18+
- name: Build a binary wheel and a source tarball
19+
run: python3 -m build
20+
- name: Store the distribution packages
21+
uses: actions/upload-artifact@v4
22+
with:
23+
name: python-package-distributions
24+
path: dist/
25+
26+
publish-to-pypi:
27+
name: Publish accml distribution to PyPI
28+
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
29+
needs:
30+
- build
31+
runs-on: ubuntu-latest
32+
environment:
33+
name: pypi
34+
url: https://pypi.org/p/pamila
35+
permissions:
36+
id-token: write # IMPORTANT: mandatory for trusted publishing
37+
steps:
38+
- name: Download all the dists
39+
uses: actions/download-artifact@v4
40+
with:
41+
name: python-package-distributions
42+
path: dist/
43+
- name: Publish distribution to PyPI
44+
uses: pypa/gh-action-pypi-publish@release/v1
45+
46+
github-release:
47+
name: Sign accl with Sigstore and upload them to GitHub Release
48+
needs:
49+
- publish-to-pypi
50+
runs-on: ubuntu-latest
51+
52+
permissions:
53+
contents: write # IMPORTANT: mandatory for making GitHub Releases
54+
id-token: write # IMPORTANT: mandatory for sigstore
55+
56+
steps:
57+
- name: Download all the dists
58+
uses: actions/download-artifact@v4
59+
with:
60+
name: python-package-distributions
61+
path: dist/
62+
- name: Sign the dists with Sigstore
63+
uses: sigstore/[email protected]
64+
with:
65+
inputs: >-
66+
./dist/*.tar.gz
67+
./dist/*.whl
68+
- name: Create GitHub Release
69+
env:
70+
GITHUB_TOKEN: ${{ github.token }}
71+
run: >-
72+
gh release create
73+
'${{ github.ref_name }}'
74+
--repo '${{ github.repository }}'
75+
--notes ""
76+
- name: Upload artifact signatures to GitHub Release
77+
env:
78+
GITHUB_TOKEN: ${{ github.token }}
79+
# Upload to GitHub Release using the `gh` CLI.
80+
# `dist/` contains the built packages, and the
81+
# sigstore-produced signatures and certificates.
82+
run: >-
83+
gh release upload
84+
'${{ github.ref_name }}' dist/**
85+
--repo '${{ github.repository }}'
86+
87+
publish-to-testpypi:
88+
name: Publish accml to TestPyPI
89+
needs:
90+
- build
91+
runs-on: ubuntu-latest
92+
93+
environment:
94+
name: testpypi
95+
url: https://test.pypi.org/p/pamila
96+
97+
permissions:
98+
id-token: write # IMPORTANT: mandatory for trusted publishing
99+
100+
steps:
101+
- name: Download all the dists
102+
uses: actions/download-artifact@v4
103+
with:
104+
name: python-package-distributions
105+
path: dist/
106+
- name: Publish distribution 📦 to TestPyPI
107+
uses: pypa/gh-action-pypi-publish@release/v1
108+
with:
109+
repository-url: https://test.pypi.org/legacy/

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ celerybeat.pid
126126
.venv
127127
env/
128128
venv/
129+
venv-pamila/
129130
ENV/
130131
env.bak/
131132
venv.bak/

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# pamila
2-
python accelerator middle layer
2+
python accelerator middle layer toolbox
3+
4+
Proposal to the pyAML collaboration for
5+
an pypi name without a name clash

pyproject.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[build-system]
2+
requires = [ "poetry-core>=1.0.0",]
3+
build-backend = "poetry.core.masonry.api"
4+
5+
[tool.poetry]
6+
name = "pamila"
7+
version = "0.0.0"
8+
description = "python accelerator middle layer"
9+
authors = ["Hidaka, Yoshiteru"]
10+
license = "GPL-3.0"
11+
# until we have the repoitory
12+
# poerty is picky
13+
homepage = "https://github.com/hz-b/pamila"
14+
documentation = "https://github.com/hz-b/pamila"
15+
repository = "https://github.com/hz-b/pamila"
16+
keywords = []
17+
18+
[tool.poetry.dependencies]
19+
python = ">=3.7"

src/pamila/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
"""Naming proposal
2+
"""
3+
4+
__all__ = []

0 commit comments

Comments
 (0)