Skip to content

Commit ea33816

Browse files
authored
Merge pull request #1 from Anselmoo/package
Update version to 0.1.1 and dependencies
2 parents 4899398 + 607df68 commit ea33816

File tree

4 files changed

+217
-89
lines changed

4 files changed

+217
-89
lines changed

.github/workflows/python-publish.yaml

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

opt/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
from __future__ import annotations
44

55

6-
__version__ = "0.1.0"
6+
__version__ = "0.1.1"

0 commit comments

Comments
 (0)