Skip to content

Commit 9d5475a

Browse files
- Removed the word 'test' from the examples
- Made the amiibo example dump the amiibo to a file - Added the .github/workflows directory - Created publish.yml
1 parent 9ae8c7c commit 9d5475a

File tree

4 files changed

+38
-0
lines changed

4 files changed

+38
-0
lines changed

.github/workflows/publish.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish Python 🐍 distributions 📦 to PyPI
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build-n-publish:
9+
name: Build and publish Python 🐍 distributions 📦 to PyPI
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Set up Python
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: 3.12
18+
19+
- name: Install pip
20+
run: python -m pip install --upgrade pip
21+
22+
- name: Install dependencies
23+
run: pip install -r requirements.txt
24+
25+
- name: Install build
26+
run: python -m pip install build
27+
28+
- name: Build a binary wheel and a source tarball
29+
run: python -m build --sdist --wheel --outdir dist/
30+
31+
- name: Publish distribution 📦 to PyPI
32+
uses: pypa/gh-action-pypi-publish@release/v1
33+
with:
34+
user: __token__
35+
password: ${{ secrets.PYPI_API_TOKEN }}

examples/amiibo_test.py renamed to examples/amiibo.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@
77
amiibo_id = tag.get_id()
88

99
print("Amiibo ID:", amiibo_id)
10+
11+
with open("amiibo.bin", 'wb') as f:
12+
f.write(tag.dump())
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)