-
Notifications
You must be signed in to change notification settings - Fork 12
59 lines (57 loc) · 1.58 KB
/
cd.yml
File metadata and controls
59 lines (57 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: cd
on:
push:
tags:
- "v*"
jobs:
tagged-release:
name: Tagged Release
runs-on: windows-2022 # windows-2025 dropped InnoSetup/ISCC
environment:
name: pypi
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Install the project
run: uv sync --locked --all-extras --group pack
- name: Cache prod.keys
id: cache-prod-keys
uses: actions/cache@v5
with:
path: prod.keys
key: prod-keys
- name: Save prod.keys safely
if: steps.cache-prod-keys.outputs.cache-hit != 'true'
env:
PROD_KEYS: ${{ secrets.PROD_KEYS }}
run: $env:PROD_KEYS | Out-File prod.keys
- name: Build EXE with PyInstaller
run: uv run python pyinstaller.py
- name: Create Windows Installer with Inno Setup
run: |
$env:NTON_VERSION = uvx hatch version
iscc setup.iss
mv dist/NTON-*.exe .
- name: Build Portable EXE with PyInstaller
shell: pwsh
run: |
uv run python pyinstaller.py --one-file
mv dist/NTON.exe NTON-${{ github.ref_name }}-portable.exe
- name: Build project
run: uv build
- name: Deploy release
uses: marvinpinto/action-automatic-releases@latest
with:
prerelease: false
repo_token: "${{ secrets.GITHUB_TOKEN }}"
files: |
NTON-*.exe
NTON-*-portable.exe
- name: Publish to PyPI
run: uv publish