keygen-py 0.0.1.dev3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- keygen_py-0.0.1.dev3/.github/workflows/release.yml +210 -0
- keygen_py-0.0.1.dev3/.github/workflows/test.yml +38 -0
- keygen_py-0.0.1.dev3/.gitignore +5 -0
- keygen_py-0.0.1.dev3/Cargo.lock +2059 -0
- keygen_py-0.0.1.dev3/Cargo.toml +15 -0
- keygen_py-0.0.1.dev3/LICENSE +21 -0
- keygen_py-0.0.1.dev3/PKG-INFO +95 -0
- keygen_py-0.0.1.dev3/README.md +85 -0
- keygen_py-0.0.1.dev3/keygen_sh.pyi +62 -0
- keygen_py-0.0.1.dev3/poetry.lock +46 -0
- keygen_py-0.0.1.dev3/pyproject.toml +26 -0
- keygen_py-0.0.1.dev3/src/config.rs +54 -0
- keygen_py-0.0.1.dev3/src/date.rs +17 -0
- keygen_py-0.0.1.dev3/src/lib.rs +55 -0
- keygen_py-0.0.1.dev3/src/license.rs +45 -0
- keygen_py-0.0.1.dev3/src/utils.rs +11 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
linux:
|
|
13
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
14
|
+
strategy:
|
|
15
|
+
fail-fast: true
|
|
16
|
+
matrix:
|
|
17
|
+
platform:
|
|
18
|
+
- runner: ubuntu-latest
|
|
19
|
+
target: x86_64
|
|
20
|
+
before: 'yum install --assumeyes perl-core'
|
|
21
|
+
- runner: ubuntu-latest
|
|
22
|
+
target: x64
|
|
23
|
+
before: 'yum install --assumeyes perl-core'
|
|
24
|
+
- runner: ubuntu-latest
|
|
25
|
+
target: aarch64
|
|
26
|
+
before: 'apt update && apt install -y libssl-dev'
|
|
27
|
+
- runner: ubuntu-latest
|
|
28
|
+
target: armv7
|
|
29
|
+
before: 'apt update && apt install -y libssl-dev'
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v4
|
|
32
|
+
- uses: actions/setup-python@v5
|
|
33
|
+
with:
|
|
34
|
+
python-version: 3.*
|
|
35
|
+
- name: Build wheels
|
|
36
|
+
uses: PyO3/maturin-action@v1
|
|
37
|
+
with:
|
|
38
|
+
target: ${{ matrix.platform.target }}
|
|
39
|
+
args: --release --out dist --find-interpreter
|
|
40
|
+
sccache: 'true'
|
|
41
|
+
manylinux: 'auto'
|
|
42
|
+
before-script-linux: ${{ matrix.platform.before }}
|
|
43
|
+
- name: Upload wheels
|
|
44
|
+
uses: actions/upload-artifact@v4
|
|
45
|
+
with:
|
|
46
|
+
name: wheels-linux-${{ matrix.platform.target }}
|
|
47
|
+
path: dist
|
|
48
|
+
|
|
49
|
+
musllinux:
|
|
50
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
51
|
+
strategy:
|
|
52
|
+
fail-fast: true
|
|
53
|
+
matrix:
|
|
54
|
+
platform:
|
|
55
|
+
- runner: ubuntu-latest
|
|
56
|
+
target: x86_64
|
|
57
|
+
before: 'apt update && apt install -y libssl-dev'
|
|
58
|
+
- runner: ubuntu-latest
|
|
59
|
+
target: x86
|
|
60
|
+
before: 'apt update && apt install -y libssl-dev'
|
|
61
|
+
- runner: ubuntu-latest
|
|
62
|
+
target: aarch64
|
|
63
|
+
before: 'apt update && apt install -y libssl-dev'
|
|
64
|
+
- runner: ubuntu-latest
|
|
65
|
+
target: armv7
|
|
66
|
+
before: 'apt update && apt install -y libssl-dev'
|
|
67
|
+
steps:
|
|
68
|
+
- uses: actions/checkout@v4
|
|
69
|
+
- uses: actions/setup-python@v5
|
|
70
|
+
with:
|
|
71
|
+
python-version: 3.*
|
|
72
|
+
- name: Build wheels
|
|
73
|
+
uses: PyO3/maturin-action@v1
|
|
74
|
+
with:
|
|
75
|
+
target: ${{ matrix.platform.target }}
|
|
76
|
+
args: --release --out dist --find-interpreter
|
|
77
|
+
sccache: 'true'
|
|
78
|
+
manylinux: musllinux_1_2
|
|
79
|
+
before-script-linux: ${{ matrix.platform.before }}
|
|
80
|
+
- name: Upload wheels
|
|
81
|
+
uses: actions/upload-artifact@v4
|
|
82
|
+
with:
|
|
83
|
+
name: wheels-musllinux-${{ matrix.platform.target }}
|
|
84
|
+
path: dist
|
|
85
|
+
|
|
86
|
+
windows:
|
|
87
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
88
|
+
strategy:
|
|
89
|
+
fail-fast: true
|
|
90
|
+
matrix:
|
|
91
|
+
platform:
|
|
92
|
+
- runner: windows-latest
|
|
93
|
+
target: x64
|
|
94
|
+
- runner: windows-latest
|
|
95
|
+
target: x86
|
|
96
|
+
steps:
|
|
97
|
+
- uses: actions/checkout@v4
|
|
98
|
+
- uses: actions/setup-python@v5
|
|
99
|
+
with:
|
|
100
|
+
python-version: 3.*
|
|
101
|
+
architecture: ${{ matrix.platform.target }}
|
|
102
|
+
- name: Build wheels
|
|
103
|
+
uses: PyO3/maturin-action@v1
|
|
104
|
+
with:
|
|
105
|
+
target: ${{ matrix.platform.target }}
|
|
106
|
+
args: --release --out dist --find-interpreter
|
|
107
|
+
sccache: 'true'
|
|
108
|
+
- name: Upload wheels
|
|
109
|
+
uses: actions/upload-artifact@v4
|
|
110
|
+
with:
|
|
111
|
+
name: wheels-windows-${{ matrix.platform.target }}
|
|
112
|
+
path: dist
|
|
113
|
+
|
|
114
|
+
macos:
|
|
115
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
116
|
+
strategy:
|
|
117
|
+
fail-fast: true
|
|
118
|
+
matrix:
|
|
119
|
+
platform:
|
|
120
|
+
- runner: macos-latest
|
|
121
|
+
target: x86_64
|
|
122
|
+
- runner: macos-latest
|
|
123
|
+
target: aarch64
|
|
124
|
+
steps:
|
|
125
|
+
- uses: actions/checkout@v4
|
|
126
|
+
- uses: actions/setup-python@v5
|
|
127
|
+
with:
|
|
128
|
+
python-version: 3.*
|
|
129
|
+
- name: Build wheels
|
|
130
|
+
uses: PyO3/maturin-action@v1
|
|
131
|
+
with:
|
|
132
|
+
target: ${{ matrix.platform.target }}
|
|
133
|
+
args: --release --out dist --find-interpreter
|
|
134
|
+
sccache: 'true'
|
|
135
|
+
- name: Upload wheels
|
|
136
|
+
uses: actions/upload-artifact@v4
|
|
137
|
+
with:
|
|
138
|
+
name: wheels-macos-${{ matrix.platform.target }}
|
|
139
|
+
path: dist
|
|
140
|
+
|
|
141
|
+
sdist:
|
|
142
|
+
runs-on: ubuntu-latest
|
|
143
|
+
steps:
|
|
144
|
+
- uses: actions/checkout@v4
|
|
145
|
+
- name: Build sdist
|
|
146
|
+
uses: PyO3/maturin-action@v1
|
|
147
|
+
with:
|
|
148
|
+
command: sdist
|
|
149
|
+
args: --out dist
|
|
150
|
+
- name: Upload sdist
|
|
151
|
+
uses: actions/upload-artifact@v4
|
|
152
|
+
with:
|
|
153
|
+
name: wheels-sdist
|
|
154
|
+
path: dist
|
|
155
|
+
|
|
156
|
+
release:
|
|
157
|
+
name: Release
|
|
158
|
+
runs-on: ubuntu-latest
|
|
159
|
+
if: ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
|
|
160
|
+
needs: [linux, musllinux, windows, macos, sdist]
|
|
161
|
+
permissions:
|
|
162
|
+
# Use to sign the release artifacts
|
|
163
|
+
id-token: write
|
|
164
|
+
# Used to upload release artifacts
|
|
165
|
+
contents: write
|
|
166
|
+
# Used to generate artifact attestation
|
|
167
|
+
attestations: write
|
|
168
|
+
steps:
|
|
169
|
+
- uses: actions/download-artifact@v4
|
|
170
|
+
- name: Generate artifact attestation
|
|
171
|
+
uses: actions/attest-build-provenance@v1
|
|
172
|
+
with:
|
|
173
|
+
subject-path: 'wheels-*/*'
|
|
174
|
+
|
|
175
|
+
- name: Get project version
|
|
176
|
+
id: 'pyproject_version'
|
|
177
|
+
run: echo "version=v$(grep -m 1 version pyproject.toml | tr -s ' ' | tr -d '"' | tr -d "'" | cut -d' ' -f3)" >> $GITHUB_OUTPUT
|
|
178
|
+
|
|
179
|
+
- name: Publish to PyPI
|
|
180
|
+
uses: PyO3/maturin-action@v1
|
|
181
|
+
env:
|
|
182
|
+
MATURIN_PYPI_TOKEN: ${{ secrets.POETRY_PYPI_TOKEN_PYPI }}
|
|
183
|
+
with:
|
|
184
|
+
command: upload
|
|
185
|
+
args: --non-interactive --skip-existing wheels-*/*
|
|
186
|
+
|
|
187
|
+
- name: Build changelog
|
|
188
|
+
id: build_changelog
|
|
189
|
+
uses: mikepenz/release-changelog-builder-action@v5
|
|
190
|
+
env:
|
|
191
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
192
|
+
with:
|
|
193
|
+
toTag: ${{ github.sha }}
|
|
194
|
+
ignorePreReleases: 'true'
|
|
195
|
+
configurationJson: |
|
|
196
|
+
{
|
|
197
|
+
"template": "## Release ${{ steps.pyproject_version.outputs.version }}\n\n#{{CHANGELOG}}",
|
|
198
|
+
"categories": [
|
|
199
|
+
{
|
|
200
|
+
"title": "### Changes",
|
|
201
|
+
"labels": []
|
|
202
|
+
}
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
- name: Create release
|
|
207
|
+
uses: softprops/action-gh-release@v2
|
|
208
|
+
with:
|
|
209
|
+
body: ${{ steps.build_changelog.outputs.changelog }}
|
|
210
|
+
tag_name: ${{ steps.pyproject_version.outputs.version }}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
build:
|
|
9
|
+
runs-on: ${{ matrix.os }}
|
|
10
|
+
strategy:
|
|
11
|
+
matrix:
|
|
12
|
+
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
|
|
13
|
+
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Set up Rust
|
|
19
|
+
uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
20
|
+
|
|
21
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: ${{ matrix.python-version }}
|
|
25
|
+
|
|
26
|
+
- name: Install and configure Poetry
|
|
27
|
+
uses: snok/install-poetry@v1
|
|
28
|
+
with:
|
|
29
|
+
version: '1.8.3'
|
|
30
|
+
|
|
31
|
+
- name: Install dependencies
|
|
32
|
+
run: poetry install
|
|
33
|
+
shell: bash
|
|
34
|
+
|
|
35
|
+
- name: Build wheel for lib
|
|
36
|
+
run: poetry run maturin build
|
|
37
|
+
shell: bash
|
|
38
|
+
|