pkg-upgrade 1.1.0__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.
- pkg_upgrade-1.1.0/.github/dependabot.yml +17 -0
- pkg_upgrade-1.1.0/.github/workflows/ci.yml +166 -0
- pkg_upgrade-1.1.0/.github/workflows/formula-bump.yml +77 -0
- pkg_upgrade-1.1.0/.github/workflows/release.yml +61 -0
- pkg_upgrade-1.1.0/.gitignore +23 -0
- pkg_upgrade-1.1.0/.pre-commit-config.yaml +25 -0
- pkg_upgrade-1.1.0/CHANGELOG.md +504 -0
- pkg_upgrade-1.1.0/CLAUDE.md +67 -0
- pkg_upgrade-1.1.0/Formula/pkg-upgrade.rb +62 -0
- pkg_upgrade-1.1.0/PKG-INFO +103 -0
- pkg_upgrade-1.1.0/README.md +80 -0
- pkg_upgrade-1.1.0/docs/CONTRIBUTING.md +46 -0
- pkg_upgrade-1.1.0/docs/superpowers/plans/2026-04-12-install-sh.md +324 -0
- pkg_upgrade-1.1.0/docs/superpowers/plans/2026-04-12-mac-upgrade.md +2211 -0
- pkg_upgrade-1.1.0/docs/superpowers/plans/2026-04-12-semantic-release-and-full-ci.md +628 -0
- pkg_upgrade-1.1.0/docs/superpowers/plans/2026-04-13-pkg-upgrade-foundation.md +1478 -0
- pkg_upgrade-1.1.0/docs/superpowers/plans/2026-04-13-pkg-upgrade-managers.md +1543 -0
- pkg_upgrade-1.1.0/docs/superpowers/specs/2026-04-12-install-sh-design.md +115 -0
- pkg_upgrade-1.1.0/docs/superpowers/specs/2026-04-12-mac-upgrade-design.md +194 -0
- pkg_upgrade-1.1.0/docs/superpowers/specs/2026-04-12-onboarding-config-design.md +182 -0
- pkg_upgrade-1.1.0/docs/superpowers/specs/2026-04-12-semantic-release-and-full-ci-design.md +186 -0
- pkg_upgrade-1.1.0/docs/superpowers/specs/2026-04-13-pkg-upgrade-cross-platform-design.md +215 -0
- pkg_upgrade-1.1.0/install.sh +83 -0
- pkg_upgrade-1.1.0/pyproject.toml +135 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/__init__.py +1 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/_brew_cache.py +30 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/_subprocess.py +22 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/app.py +260 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/cli.py +228 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/config.py +182 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/declarative.py +134 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/errors.py +2 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/executor.py +166 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/manager.py +31 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/managers/__init__.py +1 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/managers/brew.py +39 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/managers/cask.py +40 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/managers/declarative/__init__.py +0 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/managers/declarative/apt.yaml +13 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/managers/declarative/choco.yaml +13 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/managers/declarative/dnf.yaml +13 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/managers/declarative/flatpak.yaml +12 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/managers/declarative/mas.yaml +12 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/managers/declarative/pacman.yaml +13 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/managers/declarative/scoop.yaml +12 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/managers/declarative/snap.yaml +13 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/managers/declarative/winget.yaml +12 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/managers/gem.py +43 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/managers/npm.py +39 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/managers/pip.py +39 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/managers/system.py +51 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/models.py +18 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/notifier.py +29 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/onboarding.py +219 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/parsers/__init__.py +38 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/parsers/apt.py +31 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/parsers/choco.py +22 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/parsers/dnf.py +30 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/parsers/flatpak.py +21 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/parsers/generic.py +37 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/parsers/mas.py +29 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/parsers/pacman.py +29 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/parsers/scoop.py +37 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/parsers/snap.py +22 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/parsers/winget.py +38 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/platform.py +56 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/registry.py +106 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/self_update.py +83 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/status.py +30 -0
- pkg_upgrade-1.1.0/src/pkg_upgrade/widgets.py +135 -0
- pkg_upgrade-1.1.0/tests/__init__.py +0 -0
- pkg_upgrade-1.1.0/tests/conftest.py +32 -0
- pkg_upgrade-1.1.0/tests/fixtures/parsers/apt.txt +4 -0
- pkg_upgrade-1.1.0/tests/fixtures/parsers/choco.txt +3 -0
- pkg_upgrade-1.1.0/tests/fixtures/parsers/dnf.txt +9 -0
- pkg_upgrade-1.1.0/tests/fixtures/parsers/flatpak.txt +3 -0
- pkg_upgrade-1.1.0/tests/fixtures/parsers/mas.txt +3 -0
- pkg_upgrade-1.1.0/tests/fixtures/parsers/pacman.txt +3 -0
- pkg_upgrade-1.1.0/tests/fixtures/parsers/scoop.txt +7 -0
- pkg_upgrade-1.1.0/tests/fixtures/parsers/snap.txt +4 -0
- pkg_upgrade-1.1.0/tests/fixtures/parsers/winget.txt +6 -0
- pkg_upgrade-1.1.0/tests/test_cli.py +208 -0
- pkg_upgrade-1.1.0/tests/test_config.py +143 -0
- pkg_upgrade-1.1.0/tests/test_cross_os_discovery.py +29 -0
- pkg_upgrade-1.1.0/tests/test_declarative.py +159 -0
- pkg_upgrade-1.1.0/tests/test_declarative_gating.py +66 -0
- pkg_upgrade-1.1.0/tests/test_executor.py +96 -0
- pkg_upgrade-1.1.0/tests/test_manager.py +98 -0
- pkg_upgrade-1.1.0/tests/test_managers/__init__.py +0 -0
- pkg_upgrade-1.1.0/tests/test_managers/test_brew.py +76 -0
- pkg_upgrade-1.1.0/tests/test_managers/test_cask.py +49 -0
- pkg_upgrade-1.1.0/tests/test_managers/test_gem.py +41 -0
- pkg_upgrade-1.1.0/tests/test_managers/test_npm.py +44 -0
- pkg_upgrade-1.1.0/tests/test_managers/test_pip.py +38 -0
- pkg_upgrade-1.1.0/tests/test_managers/test_system.py +47 -0
- pkg_upgrade-1.1.0/tests/test_manifests.py +41 -0
- pkg_upgrade-1.1.0/tests/test_models.py +25 -0
- pkg_upgrade-1.1.0/tests/test_notifier.py +56 -0
- pkg_upgrade-1.1.0/tests/test_parsers/__init__.py +0 -0
- pkg_upgrade-1.1.0/tests/test_parsers/test_generic.py +52 -0
- pkg_upgrade-1.1.0/tests/test_parsers_presets.py +103 -0
- pkg_upgrade-1.1.0/tests/test_platform.py +47 -0
- pkg_upgrade-1.1.0/tests/test_registry.py +107 -0
- pkg_upgrade-1.1.0/tests/test_self_update.py +84 -0
- pkg_upgrade-1.1.0/tests/test_subprocess.py +32 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: github-actions
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: weekly
|
|
7
|
+
commit-message:
|
|
8
|
+
prefix: "ci"
|
|
9
|
+
include: "scope"
|
|
10
|
+
|
|
11
|
+
- package-ecosystem: pip
|
|
12
|
+
directory: "/"
|
|
13
|
+
schedule:
|
|
14
|
+
interval: weekly
|
|
15
|
+
commit-message:
|
|
16
|
+
prefix: "build"
|
|
17
|
+
include: "scope"
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, dev]
|
|
6
|
+
pull_request:
|
|
7
|
+
schedule:
|
|
8
|
+
- cron: '0 6 * * 1' # Weekly Monday 06:00 UTC for brew job
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
lint:
|
|
16
|
+
runs-on: ${{ matrix.os }}
|
|
17
|
+
strategy:
|
|
18
|
+
fail-fast: false
|
|
19
|
+
matrix:
|
|
20
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v6
|
|
23
|
+
- uses: actions/setup-python@v6
|
|
24
|
+
with:
|
|
25
|
+
python-version: "3.12"
|
|
26
|
+
cache: pip
|
|
27
|
+
- run: python -m pip install -e ".[dev]"
|
|
28
|
+
- run: ruff check .
|
|
29
|
+
- run: ruff format --check .
|
|
30
|
+
|
|
31
|
+
typecheck:
|
|
32
|
+
runs-on: ${{ matrix.os }}
|
|
33
|
+
strategy:
|
|
34
|
+
fail-fast: false
|
|
35
|
+
matrix:
|
|
36
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
37
|
+
steps:
|
|
38
|
+
- uses: actions/checkout@v6
|
|
39
|
+
- uses: actions/setup-python@v6
|
|
40
|
+
with:
|
|
41
|
+
python-version: "3.12"
|
|
42
|
+
cache: pip
|
|
43
|
+
- run: python -m pip install -e ".[dev]"
|
|
44
|
+
- run: mypy
|
|
45
|
+
|
|
46
|
+
test:
|
|
47
|
+
runs-on: ${{ matrix.os }}
|
|
48
|
+
strategy:
|
|
49
|
+
fail-fast: false
|
|
50
|
+
matrix:
|
|
51
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
52
|
+
python-version: ["3.12", "3.13"]
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v6
|
|
55
|
+
- uses: actions/setup-python@v6
|
|
56
|
+
with:
|
|
57
|
+
python-version: ${{ matrix.python-version }}
|
|
58
|
+
cache: pip
|
|
59
|
+
- run: python -m pip install -e ".[dev]"
|
|
60
|
+
- run: pytest --cov --cov-report=xml
|
|
61
|
+
- uses: actions/upload-artifact@v7
|
|
62
|
+
if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest'
|
|
63
|
+
with:
|
|
64
|
+
name: coverage-xml
|
|
65
|
+
path: coverage.xml
|
|
66
|
+
|
|
67
|
+
pre-commit:
|
|
68
|
+
runs-on: ubuntu-latest
|
|
69
|
+
steps:
|
|
70
|
+
- uses: actions/checkout@v6
|
|
71
|
+
- uses: actions/setup-python@v6
|
|
72
|
+
with:
|
|
73
|
+
python-version: "3.12"
|
|
74
|
+
cache: pip
|
|
75
|
+
- run: python -m pip install -e ".[dev]"
|
|
76
|
+
- run: pre-commit run --all-files --show-diff-on-failure
|
|
77
|
+
|
|
78
|
+
build:
|
|
79
|
+
runs-on: ubuntu-latest
|
|
80
|
+
steps:
|
|
81
|
+
- uses: actions/checkout@v6
|
|
82
|
+
- uses: actions/setup-python@v6
|
|
83
|
+
with:
|
|
84
|
+
python-version: "3.12"
|
|
85
|
+
cache: pip
|
|
86
|
+
- run: python -m pip install build twine
|
|
87
|
+
- run: python -m build
|
|
88
|
+
- run: python -m twine check dist/*
|
|
89
|
+
- uses: actions/upload-artifact@v7
|
|
90
|
+
with:
|
|
91
|
+
name: dist
|
|
92
|
+
path: dist/
|
|
93
|
+
|
|
94
|
+
smoke:
|
|
95
|
+
runs-on: ${{ matrix.os }}
|
|
96
|
+
strategy:
|
|
97
|
+
fail-fast: false
|
|
98
|
+
matrix:
|
|
99
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
100
|
+
needs: build
|
|
101
|
+
steps:
|
|
102
|
+
- uses: actions/checkout@v6
|
|
103
|
+
- uses: actions/setup-python@v6
|
|
104
|
+
with:
|
|
105
|
+
python-version: "3.12"
|
|
106
|
+
- uses: actions/download-artifact@v8
|
|
107
|
+
with:
|
|
108
|
+
name: dist
|
|
109
|
+
path: dist/
|
|
110
|
+
- name: Smoke test (POSIX)
|
|
111
|
+
if: runner.os != 'Windows'
|
|
112
|
+
shell: bash
|
|
113
|
+
run: |
|
|
114
|
+
python -m venv .smoke
|
|
115
|
+
.smoke/bin/pip install dist/*.whl
|
|
116
|
+
.smoke/bin/pkg-upgrade --version
|
|
117
|
+
.smoke/bin/pkg-upgrade --help
|
|
118
|
+
.smoke/bin/pkg-upgrade --list
|
|
119
|
+
.smoke/bin/pkg-upgrade --show-graph
|
|
120
|
+
- name: Smoke test (Windows)
|
|
121
|
+
if: runner.os == 'Windows'
|
|
122
|
+
shell: pwsh
|
|
123
|
+
run: |
|
|
124
|
+
python -m venv .smoke
|
|
125
|
+
.smoke\Scripts\pip install (Get-ChildItem dist\*.whl | Select-Object -First 1).FullName
|
|
126
|
+
.smoke\Scripts\pkg-upgrade --version
|
|
127
|
+
.smoke\Scripts\pkg-upgrade --help
|
|
128
|
+
.smoke\Scripts\pkg-upgrade --list
|
|
129
|
+
.smoke\Scripts\pkg-upgrade --show-graph
|
|
130
|
+
|
|
131
|
+
security:
|
|
132
|
+
runs-on: macos-latest
|
|
133
|
+
steps:
|
|
134
|
+
- uses: actions/checkout@v6
|
|
135
|
+
- uses: actions/setup-python@v6
|
|
136
|
+
with:
|
|
137
|
+
python-version: "3.12"
|
|
138
|
+
cache: pip
|
|
139
|
+
- run: python -m pip install pip-audit
|
|
140
|
+
- run: pip-audit --strict --progress-spinner=off .
|
|
141
|
+
|
|
142
|
+
brew:
|
|
143
|
+
runs-on: macos-latest
|
|
144
|
+
if: |
|
|
145
|
+
github.event_name == 'schedule' ||
|
|
146
|
+
(github.event_name == 'pull_request' && contains(toJSON(github.event.pull_request.labels.*.name), 'formula')) ||
|
|
147
|
+
github.event_name == 'push'
|
|
148
|
+
steps:
|
|
149
|
+
- uses: actions/checkout@v6
|
|
150
|
+
- name: Skip if formula has placeholder SHAs
|
|
151
|
+
id: guard
|
|
152
|
+
run: |
|
|
153
|
+
if grep -q REPLACE_WITH Formula/mac-upgrade.rb; then
|
|
154
|
+
echo "Formula still has REPLACE_WITH placeholders; skipping install/test."
|
|
155
|
+
echo "skip=true" >> "$GITHUB_OUTPUT"
|
|
156
|
+
fi
|
|
157
|
+
- name: Install formula via ephemeral local tap
|
|
158
|
+
if: steps.guard.outputs.skip != 'true'
|
|
159
|
+
run: |
|
|
160
|
+
TAP_DIR="$(brew --repo liskeee/mac-upgrade-ci)"
|
|
161
|
+
mkdir -p "$TAP_DIR/Formula"
|
|
162
|
+
cp Formula/mac-upgrade.rb "$TAP_DIR/Formula/"
|
|
163
|
+
brew install --build-from-source liskeee/mac-upgrade-ci/mac-upgrade
|
|
164
|
+
- name: Test formula
|
|
165
|
+
if: steps.guard.outputs.skip != 'true'
|
|
166
|
+
run: brew test liskeee/mac-upgrade-ci/mac-upgrade
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
name: Bump Homebrew Formula
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
inputs:
|
|
8
|
+
tag:
|
|
9
|
+
description: "Release tag to bump formula to (e.g. v1.2.0)"
|
|
10
|
+
required: true
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write
|
|
14
|
+
pull-requests: write
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
bump:
|
|
18
|
+
if: ${{ github.event_name == 'workflow_dispatch' || github.event.release.prerelease == false }}
|
|
19
|
+
runs-on: macos-latest
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v6
|
|
22
|
+
with:
|
|
23
|
+
ref: main
|
|
24
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
25
|
+
|
|
26
|
+
- name: Resolve tag
|
|
27
|
+
id: tag
|
|
28
|
+
run: |
|
|
29
|
+
TAG="${{ github.event.inputs.tag || github.event.release.tag_name }}"
|
|
30
|
+
VERSION="${TAG#v}"
|
|
31
|
+
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
|
|
32
|
+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
|
33
|
+
|
|
34
|
+
- name: Compute release tarball SHA256
|
|
35
|
+
id: sha
|
|
36
|
+
run: |
|
|
37
|
+
URL="https://github.com/${{ github.repository }}/archive/refs/tags/${{ steps.tag.outputs.tag }}.tar.gz"
|
|
38
|
+
curl -fsSL "$URL" -o release.tar.gz
|
|
39
|
+
SHA=$(shasum -a 256 release.tar.gz | awk '{print $1}')
|
|
40
|
+
echo "sha=$SHA" >> "$GITHUB_OUTPUT"
|
|
41
|
+
echo "url=$URL" >> "$GITHUB_OUTPUT"
|
|
42
|
+
|
|
43
|
+
- name: Update url, sha256, and resources in formula
|
|
44
|
+
run: |
|
|
45
|
+
python3 <<'PY'
|
|
46
|
+
import re, pathlib, os
|
|
47
|
+
p = pathlib.Path("Formula/mac-upgrade.rb")
|
|
48
|
+
s = p.read_text()
|
|
49
|
+
url = os.environ["URL"]
|
|
50
|
+
sha = os.environ["SHA"]
|
|
51
|
+
s = re.sub(r'url "https://github\.com/[^"]+"', f'url "{url}"', s, count=1)
|
|
52
|
+
s = re.sub(r'sha256 "[^"]+"', f'sha256 "{sha}"', s, count=1)
|
|
53
|
+
p.write_text(s)
|
|
54
|
+
PY
|
|
55
|
+
env:
|
|
56
|
+
URL: ${{ steps.sha.outputs.url }}
|
|
57
|
+
SHA: ${{ steps.sha.outputs.sha }}
|
|
58
|
+
|
|
59
|
+
- name: Refresh Python resources
|
|
60
|
+
run: |
|
|
61
|
+
brew update-python-resources Formula/mac-upgrade.rb || true
|
|
62
|
+
|
|
63
|
+
- name: Open pull request
|
|
64
|
+
uses: peter-evans/create-pull-request@v8
|
|
65
|
+
with:
|
|
66
|
+
branch: formula-bump/${{ steps.tag.outputs.tag }}
|
|
67
|
+
commit-message: "chore(formula): bump to ${{ steps.tag.outputs.tag }}"
|
|
68
|
+
title: "chore(formula): bump to ${{ steps.tag.outputs.tag }}"
|
|
69
|
+
body: |
|
|
70
|
+
Automated formula bump for ${{ steps.tag.outputs.tag }}.
|
|
71
|
+
|
|
72
|
+
- Updated `url` and `sha256`
|
|
73
|
+
- Ran `brew update-python-resources`
|
|
74
|
+
|
|
75
|
+
Merging will trigger the `brew` CI job which validates `brew install --build-from-source` and `brew test`.
|
|
76
|
+
labels: formula
|
|
77
|
+
base: main
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, dev]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
inputs:
|
|
8
|
+
force:
|
|
9
|
+
description: "Force a release even without releasable commits"
|
|
10
|
+
type: boolean
|
|
11
|
+
default: false
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: release-${{ github.ref }}
|
|
15
|
+
cancel-in-progress: false
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
release:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
|
21
|
+
permissions:
|
|
22
|
+
contents: write
|
|
23
|
+
id-token: write
|
|
24
|
+
environment:
|
|
25
|
+
name: pypi
|
|
26
|
+
url: https://pypi.org/project/mac-upgrade/
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v6
|
|
29
|
+
with:
|
|
30
|
+
fetch-depth: 0
|
|
31
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
32
|
+
|
|
33
|
+
- uses: actions/setup-python@v6
|
|
34
|
+
with:
|
|
35
|
+
python-version: "3.12"
|
|
36
|
+
cache: pip
|
|
37
|
+
|
|
38
|
+
- name: Install release tooling
|
|
39
|
+
run: python -m pip install "python-semantic-release==9.*" build
|
|
40
|
+
|
|
41
|
+
- name: Run semantic-release
|
|
42
|
+
id: release
|
|
43
|
+
env:
|
|
44
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
45
|
+
run: |
|
|
46
|
+
if [ "${{ inputs.force }}" = "true" ]; then
|
|
47
|
+
semantic-release version --patch
|
|
48
|
+
else
|
|
49
|
+
semantic-release version
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
- name: Publish GitHub Release
|
|
53
|
+
env:
|
|
54
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
55
|
+
run: semantic-release publish
|
|
56
|
+
|
|
57
|
+
- name: Publish to PyPI
|
|
58
|
+
if: hashFiles('dist/*') != ''
|
|
59
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
60
|
+
with:
|
|
61
|
+
packages-dir: dist
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*$py.class
|
|
4
|
+
|
|
5
|
+
.pytest_cache/
|
|
6
|
+
.mypy_cache/
|
|
7
|
+
.ruff_cache/
|
|
8
|
+
.coverage
|
|
9
|
+
.coverage.*
|
|
10
|
+
htmlcov/
|
|
11
|
+
coverage.xml
|
|
12
|
+
|
|
13
|
+
build/
|
|
14
|
+
dist/
|
|
15
|
+
*.egg-info/
|
|
16
|
+
*.egg
|
|
17
|
+
|
|
18
|
+
.venv/
|
|
19
|
+
venv/
|
|
20
|
+
.env
|
|
21
|
+
|
|
22
|
+
.claude/
|
|
23
|
+
.DS_Store
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v5.0.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: trailing-whitespace
|
|
6
|
+
- id: end-of-file-fixer
|
|
7
|
+
- id: check-yaml
|
|
8
|
+
- id: check-toml
|
|
9
|
+
- id: check-merge-conflict
|
|
10
|
+
- id: check-added-large-files
|
|
11
|
+
|
|
12
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
13
|
+
rev: v0.15.10
|
|
14
|
+
hooks:
|
|
15
|
+
- id: ruff
|
|
16
|
+
args: [--fix]
|
|
17
|
+
- id: ruff-format
|
|
18
|
+
|
|
19
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
20
|
+
rev: v1.20.0
|
|
21
|
+
hooks:
|
|
22
|
+
- id: mypy
|
|
23
|
+
additional_dependencies: [textual>=3.0.0, pytest>=8.0, pytest-asyncio>=0.24, types-PyYAML>=6.0, platformdirs>=4.0]
|
|
24
|
+
args: [--config-file=pyproject.toml]
|
|
25
|
+
pass_filenames: false
|