Repository navigation
114 lines (97 loc) · 4.76 KB
/
Copy pathrelease.yml
File metadata and controls
114 lines (97 loc) · 4.76 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: Build & Release
# Manually triggered (Actions tab -> Run workflow). Builds a portable
# NoMorePwn.exe and a NoMorePwn-Setup.exe installer and publishes them as a
# PRE-RELEASE tagged v<VERSION file>. It no longer runs on every push to
# main, and it only builds if the full test workflow (lint + tests) passes.
on:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
uses: ./.github/workflows/test.yml
build:
needs: tests
runs-on: windows-latest
permissions:
contents: write # needed only to publish the release
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.12"
- name: Compute version
id: version
shell: bash
run: |
# Single source of truth: the VERSION file (bump it in a PR). Refuse to re-release a version.
v="$(tr -d '[:space:]' < VERSION)"
[[ "$v" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo "bad VERSION: $v"; exit 1; }
if git ls-remote --exit-code --tags origin "refs/tags/v$v" >/dev/null 2>&1; then
echo "tag v$v already exists; bump VERSION first"; exit 1
fi
echo "version=$v" >> "$GITHUB_OUTPUT"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-build.txt
- name: Run core tests
run: python -m unittest discover tests -v
- name: Generate app icon
run: python build/make_icon.py
- name: Build portable executable
env:
NOMOREPWN_VERSION: ${{ steps.version.outputs.version }}
run: pyinstaller build/NoMorePwn.spec --distpath dist --workpath build/_work --noconfirm
- name: Build installer (Inno Setup)
env:
NOMOREPWN_VERSION: ${{ steps.version.outputs.version }}
run: |
choco install innosetup --no-progress -y
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" build\installer.iss
- name: Stage release assets
shell: bash
run: |
mkdir -p release
cp "dist/NoMorePwn.exe" "release/NoMorePwn-${{ steps.version.outputs.version }}-portable.exe"
cp "dist/NoMorePwn-Setup.exe" "release/NoMorePwn-${{ steps.version.outputs.version }}-Setup.exe"
# The in-app updater verifies the installer against this before it
# will execute it. Filenames must be bare (no directory component)
# because the updater matches on the asset name.
cd release && sha256sum *.exe > SHA256SUMS.txt && cd ..
cat release/SHA256SUMS.txt
ls -la release
- name: Upload build artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: NoMorePwn-${{ steps.version.outputs.version }}
path: release/*
- name: Publish GitHub Release
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2.6.2
with:
tag_name: v${{ steps.version.outputs.version }}
name: NoMorePwn v${{ steps.version.outputs.version }}
generate_release_notes: true
fail_on_unmatched_files: true
# Every release from this workflow ships as a PRE-RELEASE. The in-app updater reads
# /releases/latest, which excludes pre-releases — so installed users
# are never pulled onto an unreviewed commit. To ship an update,
# promote a release in the GitHub UI ("Set as the latest release").
# This is the entire stable-channel mechanism; unset it and every
# push auto-updates every install.
prerelease: true
body: |
**NoMorePwn v${{ steps.version.outputs.version }}** — local-first, tray-resident Windows password manager.
### Downloads
- **NoMorePwn-${{ steps.version.outputs.version }}-Setup.exe** — recommended installer (Start-menu shortcut, optional launch-at-sign-in, uninstaller). No admin required.
- **NoMorePwn-${{ steps.version.outputs.version }}-portable.exe** — single-file portable app; just download and run.
The app lives in your system tray (the "show hidden icons" ⌃ area). Close the window to lock & keep it running, or quit fully from the tray. Your vault is stored encrypted under `%APPDATA%\NoMorePwn` and never leaves your device.
files: |
release/NoMorePwn-${{ steps.version.outputs.version }}-portable.exe
release/NoMorePwn-${{ steps.version.outputs.version }}-Setup.exe
release/SHA256SUMS.txt