Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from metabrainz:master #60

Open
wants to merge 477 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
477 commits
Select commit Hold shift + click to select a range
03790f4
Merge branch '2.x'
phw Sep 4, 2024
091b849
Run update_constants
phw Sep 4, 2024
551ab8a
Run update_constants
phw Sep 4, 2024
b9c71ea
Translated using Weblate (French)
Sep 4, 2024
aba24e5
Translated using Weblate (Italian)
Sep 8, 2024
c22f015
Translated using Weblate (Lithuanian)
Gateway31 Sep 8, 2024
51e82ef
Translated using Weblate (Lithuanian)
Gateway31 Sep 8, 2024
6e7d213
Translated using Weblate (Lithuanian)
Gateway31 Sep 9, 2024
09a6f79
Translated using Weblate (Lithuanian)
Gateway31 Sep 10, 2024
3e67179
Translated using Weblate (Spanish)
Sep 13, 2024
ee5198d
Translated using Weblate (Spanish)
Sep 14, 2024
9212b62
Use PyQt 5.15.11 for macOS and Windows builds
phw Sep 24, 2024
784a559
PICARD-2989: fix SettingsOverride recursion
phw Oct 9, 2024
3528c59
Update script editor examples only if script editor is visible
phw Oct 9, 2024
89a75f2
PICARD-2989: fix SettingsOverride recursion
phw Oct 9, 2024
e2ee136
Update script editor examples only if script editor is visible
phw Oct 9, 2024
03d26de
Translated using Weblate (Ukrainian)
Oct 8, 2024
9e68f1b
Translated using Weblate (Ukrainian)
Oct 8, 2024
a43ce13
Translated using Weblate (Lithuanian)
Gateway31 Oct 12, 2024
190d086
Translated using Weblate (Lithuanian)
Gateway31 Oct 12, 2024
43d3805
Add _folksonomy_tags property to MetadataItem Class
rakim0 Oct 19, 2024
a3c9b7f
Load tags to _folksonomy_tags and genres to _genres
rakim0 Oct 19, 2024
a05a1e8
Write _genres and _folksonomy_tags into file
rakim0 Oct 19, 2024
2785839
Check 'folksonomy_tag' setting and fill genre
rakim0 Oct 19, 2024
cf267f6
Move the method to follow add_genre
rakim0 Oct 20, 2024
47a139c
Remove the check for 'use_genre'
rakim0 Oct 20, 2024
d543ec0
Move repeated code to _add_tags, remove filter
rakim0 Oct 20, 2024
c82f01c
Fix tests
rakim0 Oct 21, 2024
67a2efe
Translated using Weblate (Lithuanian)
Gateway31 Oct 24, 2024
2add56f
Translated using Weblate (Lithuanian)
Gateway31 Oct 24, 2024
380f7d5
Translated using Weblate (Lithuanian)
Gateway31 Oct 31, 2024
c6c17bf
Translated using Weblate (Lithuanian)
Gateway31 Oct 31, 2024
e61edab
PICARD-3001: Allow dependency charset-normalizer 3.x
phw Nov 5, 2024
cbbf53d
PICARD-3001: Allow dependency charset-normalizer 3.x
phw Nov 5, 2024
1f241f9
Update dependencies for Win and Mac builds
phw Nov 5, 2024
d4aa337
Update dependencies for Win and Mac builds
phw Nov 5, 2024
0a6a9f3
Add custom function for title case to handle apostrophe
zytact Nov 5, 2024
d68ca07
TestPluginFunctions: ensure we call parent setUp() before using `conf…
zas Nov 5, 2024
ad661d1
Translated using Weblate (Lithuanian)
Gateway31 Nov 5, 2024
dd05cd1
Translated using Weblate (Lithuanian)
Gateway31 Nov 5, 2024
5dab69b
Merge pull request #2547 from zas/test_setup_call
zas Nov 5, 2024
3f9b151
Merge branch 'metabrainz:master' into picard-3000
zytact Nov 5, 2024
b23e3d6
Use titlecase util function instead of string title method
zytact Nov 5, 2024
d11d201
Create titlecase util function
zytact Nov 5, 2024
4a6b642
Add test for titlecase function
zytact Nov 5, 2024
fe9302a
Remove unused titlize function
zytact Nov 5, 2024
4478043
Merge pull request #2548 from zytact/picard-3000
zas Nov 5, 2024
97bd3fb
tests: add missing parent setUp() calls
zas Nov 6, 2024
154aab5
tests: remove useless tearDown() definitions
zas Nov 6, 2024
5b50798
removing unneeded config variables
rakim0 Nov 6, 2024
58286b7
Add function to remove genres from tags
rakim0 Nov 15, 2024
3f0a795
Change genres to genre
rakim0 Nov 17, 2024
657c5ab
Translated using Weblate (Chinese (Simplified Han script))
Nov 18, 2024
f7c9e92
Translated using Weblate (Chinese (Simplified Han script))
Nov 18, 2024
cb44f62
Uppercase dict names that are meant to be constant
zas Nov 13, 2024
643bbb7
Wrap few long lines
zas Nov 13, 2024
7bcf7dc
map -> mapping as map is a reserved word
zas Nov 13, 2024
15a8fc8
Add a blank line after function definition
zas Nov 13, 2024
eeff4b7
Add custom function for title case to handle apostrophe
zytact Nov 5, 2024
49680d0
Use titlecase util function instead of string title method
zytact Nov 5, 2024
3a5d3a4
Create titlecase util function
zytact Nov 5, 2024
46d475d
Add test for titlecase function
zytact Nov 5, 2024
3a61ffa
Remove unused titlize function
zytact Nov 5, 2024
1c393a6
CI: Replace deprecated macos-12 image with macos-13
phw Dec 1, 2024
983e90b
CI: Replace deprecated macos-12 image with macos-13
phw Dec 1, 2024
db1dd10
PICARD-2991: Handle statvfs errors on file rename
phw Dec 1, 2024
1c509a2
PICARD-2991: Do not fail to load renaming options page on make_filena…
phw Dec 1, 2024
d54ea83
PICARD-2991: Handle statvfs errors on file rename
phw Dec 1, 2024
24f24e7
PICARD-2991: Do not fail to load renaming options page on make_filena…
phw Dec 1, 2024
abadbde
PICARD-3008: Handle OverflowError in extract_year_from_date
phw Dec 2, 2024
442dd6a
Merge pull request #2556 from phw/PICARD-3008-fix-date-parsing-overflow
zas Dec 3, 2024
a5a967c
PICARD-3008: Handle OverflowError in extract_year_from_date
phw Dec 2, 2024
03323e2
Split CI package tasks into separate files
phw Dec 6, 2024
59a35d2
PICARD-3002: Use Azure Trusted Signing for code signing
phw Dec 6, 2024
fed0f4f
PICARD-3002: Use Azure Trusted Signing for code signing
phw Dec 5, 2024
56811ca
Pin PyQt5-sip to version 12.15 on Windows build for Python 3.8
phw Dec 7, 2024
b363994
Require older PyQt5-sip for Python before 3.9.
phw Dec 8, 2024
19cd17a
Translated using Weblate (Norwegian Bokmål)
Dec 8, 2024
4a0bacd
Translated using Weblate (Norwegian Bokmål)
Dec 8, 2024
4b851a5
PICARD-2882: Support OAuth2 PKCE
phw May 3, 2024
7e244a5
PICARD-2882: document functions s256_encode and base64url_encode
phw May 3, 2024
9a7012a
PICARD-736: oauth token exchange via webflow
phw Dec 19, 2022
8eb6c65
PICARD-736: OAuth2: If webbrowser integration is turned of use OOB flow
phw May 5, 2024
1112bba
PICARD-2886: Implemented OAuth2 server side token revocation on logout
phw May 3, 2024
ae2726a
PICARD-2886: If MB server OAuth2 logout fails, show a dialog box
phw May 3, 2024
0a4aeca
Translated using Weblate (Norwegian Bokmål)
Dec 10, 2024
b6cadf3
Translated using Weblate (Norwegian Bokmål)
Dec 10, 2024
700d330
Add Python 3.13 to Python package metadata
C0rn3j Dec 23, 2024
6565815
PICARD-3013: Fix case-only renaming on case-insensitive filesystems
phw Dec 27, 2024
ec06569
Remove unused const imports
phw Dec 28, 2024
dabaf68
PICARD-3013: Fix case-only renaming on case-insensitive filesystems
phw Dec 27, 2024
070c5ee
Add path to metadatabox
zytact Dec 28, 2024
4fefe6c
Add ~filepath to tag names
zytact Dec 28, 2024
0eaa402
Minimum supported Python version is now 3.8
phw Oct 30, 2023
cb84ea6
added tagger instance to ScriptsMenu
YohayAiTe Dec 28, 2024
241aa66
Support more LRC timestamps (#2566)
YohayAiTe Dec 29, 2024
254a42c
Merge branch 'metabrainz:master' into path-metadatabox
zytact Dec 29, 2024
9081a4a
Show File Path ignoring move and rename files
zytact Dec 29, 2024
7476783
Add helper function to check if tag is editable
zytact Dec 29, 2024
80c06b1
Add signal when file naming related settings are changed
rdswift Dec 29, 2024
6a81db5
Translated using Weblate (German)
Dec 29, 2024
da47bbe
Emit signal for each option setting but only if the value has changed.
rdswift Dec 30, 2024
56452e7
Run CI workflows for tests and PyPI packages with Python 3.13
phw Dec 28, 2024
3f3dcf9
Windows package build with Python 3.13
phw Dec 28, 2024
554e000
macOS package build with Python 3.13
phw Dec 28, 2024
81add24
Update PyInstaller to latest version 6.11.1
phw Dec 29, 2024
beb41f1
Do not consider paths with a single leading slash as absolute on Windows
phw Dec 29, 2024
57c9153
PICARD-3016: Fix log path name_filter on Windows with Python 3.13
phw Dec 29, 2024
835f275
Return old and new values with signal.
rdswift Dec 30, 2024
bf8b6b7
Rename _genres and _folksonomy_tags to genre and folksonomy_tags
rakim0 Dec 30, 2024
539e104
Move delete_genre_from_tag from track.py to album.py
rakim0 Dec 30, 2024
ccef1a1
Merge pull request #2567 from rdswift/rename_settings_changed_signal
rdswift Dec 31, 2024
122e348
Merge branch 'metabrainz:master' into path-metadatabox
zytact Dec 31, 2024
77caf68
Update metadatabox on settings change
zytact Dec 31, 2024
ef079b3
Add additional settings to watch
zytact Dec 31, 2024
034d54b
Merge pull request #2563 from zytact/path-metadatabox
phw Jan 1, 2025
f21f48f
PICARD-3014: Fix macOS not sorting empty values before other entries
phw Dec 29, 2024
3dce3ef
PICARD-3014: Fix macOS not sorting empty values before other entries
phw Dec 29, 2024
f516a96
Rename settings_changed_signal to just settings_changed
phw Dec 31, 2024
923eba9
Handle option menu toggles update with new settings_changed signal
phw Dec 31, 2024
e96f282
Handle clear_existing_tags change in metadatabox
phw Jan 1, 2025
1605cac
Fix opening option dialog with specific page
phw Jan 1, 2025
2e1877f
Merge pull request #2545 from rakim0/picard-2607
phw Jan 1, 2025
4912e0b
Translated using Weblate (Chinese (Traditional Han script))
weblate Jan 1, 2025
3c35389
PICARD-3019: Move setting_changed signal to ConfigSection class
phw Dec 31, 2024
0b2a61b
PICARD-3019: Rebuild options menu on setting profile changes
phw Dec 31, 2024
7d95755
Ensure options are registered in profiles on startup
phw Jan 1, 2025
a0b8643
CI: Use actions/setup-python cache for pip
phw Jan 3, 2025
31f43d1
Translated using Weblate (Turkish)
Jan 3, 2025
155949e
Build with PyQt 6.8 for Windows and macOS
phw Jan 3, 2025
7cc0e8c
Update dependencies for Win and Mac builds
phw Jan 4, 2025
6d95bcf
Translated using Weblate (Swedish)
Jan 6, 2025
88b22e7
Fix headers/copyrights
zas Jan 7, 2025
59918cb
Fix headers/copyrights
zas Jan 7, 2025
c086fb3
Fix headers/copyrights
zas Jan 7, 2025
e5b5f49
Fix headers/copyrights
zas Jan 7, 2025
02dab27
Merge pull request #2571 from zas/fix_headers_2024
zas Jan 7, 2025
54a1b40
PICARD-3012: Sort files by disc no. when submitting cluster as release
phw Jan 7, 2025
26635b2
Moved addrelease.extract_discnumber functionality to Item.discnumber
phw Jan 7, 2025
fcb8937
Use consistent logic for Item.discnumber and Item.tracknumber
phw Jan 7, 2025
c848ce1
Use ValueError exception (missed change)
zas Jan 7, 2025
44ef68f
Use a common function for both tracknumber() and discnumber()
zas Jan 7, 2025
8383958
PICARD-3012: Sort files by disc no. when submitting cluster as release
phw Jan 7, 2025
d8acdb3
Update dependencies for macOS and Win builds
phw Jan 8, 2025
0dbf51f
PICARD-3021: Context menu action to merge original and new metadata v…
phw Jan 8, 2025
47166fb
Update picard.pot
phw Jan 9, 2025
0cfb1b7
Update translation files
weblate Jan 9, 2025
1f0a590
PICARD-3021: Context menu action to merge original and new metadata v…
phw Jan 8, 2025
8f2eb16
Update picard.pot
phw Jan 9, 2025
beb6b08
Translated using Weblate (Chinese (Traditional Han script))
weblate Jan 9, 2025
c8d3e45
Update translation files
weblate Jan 9, 2025
bd7fad8
Run update constants
phw Jan 9, 2025
ca45c2e
Run update constants
phw Jan 9, 2025
307a850
Fix loading of folksonomy tags / genres
phw Jan 8, 2025
c9b87bc
Added tests for Track genre handling
phw Jan 9, 2025
f830d96
Translated using Weblate (Chinese (Simplified Han script))
weblate Jan 9, 2025
7bc1880
Translated using Weblate (Finnish)
Jormangeud Jan 9, 2025
b6ef159
Add Python 3.13 to Python package metadata
C0rn3j Dec 23, 2024
879e8ba
Run CI workflows for tests and PyPI packages with Python 3.13
phw Jan 10, 2025
14f6e6b
Do not consider paths with a single leading slash as absolute on Windows
phw Dec 29, 2024
ba2fc89
CI: Use actions/setup-python cache for pip
phw Jan 10, 2025
d9d85f3
Translated using Weblate (German)
phw Jan 10, 2025
3a7fec4
Update some UI labels for consistency and easier translation
phw Jan 10, 2025
6f23465
Translated using Weblate (German)
phw Jan 10, 2025
ff1a70d
Translated using Weblate (Albanian)
ujdhesa Jan 10, 2025
a220620
Update translation files
weblate Jan 10, 2025
0297da2
Translated using Weblate (Albanian)
ujdhesa Jan 12, 2025
e212682
Translated using Weblate (Albanian)
ujdhesa Jan 13, 2025
6307a50
Translated using Weblate (Italian)
Jan 14, 2025
89163d0
Translated using Weblate (Italian)
Jan 14, 2025
87fada2
Translated using Weblate (Norwegian Bokmål)
Jan 16, 2025
20fa83c
Translated using Weblate (Lithuanian)
Gateway31 Jan 20, 2025
a9828f7
Translated using Weblate (Polish)
Echelon666 Jan 20, 2025
8179f06
Translated using Weblate (Polish)
Echelon666 Jan 20, 2025
5c1e988
Translated using Weblate (Lithuanian)
Gateway31 Jan 24, 2025
a505657
Translated using Weblate (Albanian)
weblate Feb 1, 2025
a0c43ec
Bump azure/trusted-signing-action from 0.5.0 to 0.5.1
dependabot[bot] Feb 1, 2025
6199aef
Bump azure/trusted-signing-action from 0.5.0 to 0.5.1
dependabot[bot] Feb 1, 2025
7c8b499
Update constants
phw Feb 4, 2025
a417ed8
Release 2.13
phw Feb 4, 2025
e463588
Merge branch '2.x'
phw Feb 4, 2025
d6d5652
Update constants
phw Feb 4, 2025
893dca5
Move pypi-release task into package.yml
phw Feb 4, 2025
8bf6f40
Release 2.13.1a1
phw Feb 4, 2025
15fd3b8
Removed github-release dependency on package-pypi
phw Feb 4, 2025
998ee6f
Release 2.13.1
phw Feb 5, 2025
19db271
Merge branch '2.x'
phw Feb 5, 2025
8233af3
Fix msix package filename not containing version
phw Feb 5, 2025
be26389
Merge branch '2.x'
phw Feb 5, 2025
341267d
PICARD-3030: Fix crash when merging original values for multiple tags
phw Feb 6, 2025
839260b
Refactor metadatabox use original values
phw Feb 6, 2025
e8033cc
_use/merge_orig_tags(): reduce code redundancy
zas Feb 6, 2025
85227ce
set_tag_values() -> _set_tag_values()
zas May 17, 2024
18ff872
PICARD-3030: Fix crash when merging original values for multiple tags
phw Feb 6, 2025
f137d55
Refactor metadatabox use original values
phw Feb 6, 2025
aab55f5
_use/merge_orig_tags(): reduce code redundancy
zas Feb 6, 2025
f0b6669
Release 2.13.2
phw Feb 7, 2025
c9a0e6f
Merge branch '2.x'
phw Feb 7, 2025
7cf46d2
Translated using Weblate (Albanian)
weblate Feb 8, 2025
14005d0
Translated using Weblate (Chinese (Simplified Han script))
Feb 14, 2025
a8ad7a3
Translated using Weblate (Chinese (Simplified Han script))
Feb 14, 2025
bf75fca
PICARD-3034: Fix win-build-fixes.ps1 not being called
phw Feb 15, 2025
910d4f9
PICARD-3034: Make win-build-fixes.ps1 more verbose
phw Feb 15, 2025
cbad0e9
Upgrade to PyInstaller 6.12.0
phw Feb 16, 2025
7c14bc1
Build Win/Mac packages with lates PyQt 6.8.1
phw Feb 16, 2025
3cacb7f
Removed win-build-fixes.ps1, the workaround is no longer required for…
phw Feb 16, 2025
24482e4
PICARD-2909: Do not write image width / height for Opus files
phw Feb 16, 2025
ae203d7
PICARD-2909: Do not write image width / height for Opus files
phw Feb 16, 2025
e2dcd09
PICARD-2192: For macOS build separate x86_64 and arm64 packages
phw Feb 16, 2025
5e7386c
Run update_constants
phw Feb 17, 2025
8a062c9
Release 2.13.3
phw Feb 17, 2025
1ea6e53
Merge branch '2.x'
phw Feb 17, 2025
2649273
Translated using Weblate (Chinese (Simplified Han script))
Feb 20, 2025
ad87d4d
Declare variables to None to make pylint happier (mainly conditional …
zas Feb 21, 2025
68fd0c9
Declare pywintypes & win32api to None if not imported
zas Feb 21, 2025
6083d20
Disable pylint too-many-positional-arguments
zas Feb 21, 2025
8b445aa
Merge pull request #2581 from zas/codacy_warnings
zas Feb 21, 2025
936174d
CoverArt._set_metatada() call: Fix missing argument image_info when u…
zas Feb 22, 2025
6322c20
Prospector: do not run mccabe (complexity) and skip generated files
zas Feb 22, 2025
973593f
Use % style instead of f-strings for logging
zas Feb 22, 2025
d0c6750
Merge pull request #2582 from zas/codacy_fixes
zas Feb 22, 2025
1fd1fc3
Add ruff config to pyproject.toml
zas Feb 22, 2025
608b7e2
Add ruff
zas Feb 22, 2025
eb009f9
Fix unused variables warnings, mainly by prefixing them with _
zas Feb 23, 2025
a468313
Ignore some annoying flake8 warnings (mostly about capitalization)
zas Feb 23, 2025
73d25ce
Use raise ... from were applicable
zas Feb 23, 2025
b81c78f
Fix E741, B020, B007 warnings
zas Feb 23, 2025
954d057
Add missing @staticmethod
zas Feb 23, 2025
2fb5fc2
Ignore B008, as its the correct proto
zas Feb 23, 2025
54aef92
Simplify, set with twice the same element
zas Feb 23, 2025
1f99dcb
Use latest ruff (explicit)
zas Feb 23, 2025
f4f5c47
Do not add a project section yet
zas Feb 23, 2025
a4282e5
py38 -> py39
zas Feb 24, 2025
310945b
always -> run_on_error
zas Feb 24, 2025
8149344
Raise from previous ValueError exception
zas Feb 24, 2025
e9583b4
Raise from previous OSError
zas Feb 24, 2025
e06a7a2
Remove noqa: B008, define parent parameter as None and properly initi…
zas Feb 24, 2025
58bd318
_e -> _i
zas Feb 24, 2025
f5ac45a
Merge pull request #2583 from zas/ruff_config
zas Feb 24, 2025
5daf68a
Introduce TracksCache and simplify _match_files()
zas Feb 24, 2025
1212796
_parse_release(): Move release redirect code to its own method
zas Feb 24, 2025
077f042
_hande_release_redirect(): reduce indentation level
zas Feb 24, 2025
968bc57
Rename m to metadata, and move customization code to its own method
zas Feb 24, 2025
7d8d8e8
_parse_release(): move part of the code to new _needs_track_relations…
zas Feb 24, 2025
c230a89
Explode _parse_release() in smaller bits:
zas Feb 24, 2025
11f8e5b
Replaced deprecated log.warn calls with log.warning
phw Feb 25, 2025
19b42bc
Merge pull request #2585 from zas/refactor_trackscache
zas Feb 25, 2025
400d7c0
Merge pull request #2586 from zas/refactor_parse_release
zas Feb 25, 2025
4ab0ae6
Replace "setup.py test" with pytest
phw Feb 24, 2025
27a4855
Build packages with PEP 517 "python -m build"
phw Feb 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 13 additions & 8 deletions .github/workflows/package-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@ permissions: {}

jobs:
package-macos:
runs-on: macos-11
runs-on: macos-13
strategy:
matrix:
setup:
- macos-deployment-version: 11
python-version: 3.12.1-macos11
python-sha256sum: 6178e42679eb83196240fc58b1438f481c32c2b0557f28ccf43aa7b1b80b7c4a
- macos-deployment-version: '11.0'
target-arch: 'x86_64'
python-version: 3.13.1-macos11
python-sha256sum: 67c6f0a3190851e0013214d5abd725a42ec398ff1b50eec47826820fd052d86b
- macos-deployment-version: '11.0'
target-arch: 'arm64'
python-version: 3.13.1-macos11
python-sha256sum: 67c6f0a3190851e0013214d5abd725a42ec398ff1b50eec47826820fd052d86b
env:
DISCID_VERSION: 0.6.4
DISCID_SHA256SUM: 829133dd38acbdaa2b989de59e256c8d139ac34cb4dd4b8fd3c9d55a97c824f3
Expand All @@ -21,6 +26,7 @@ jobs:
PYTHON_VERSION: ${{ matrix.setup.python-version }}
PYTHON_SHA256SUM: ${{ matrix.setup.python-sha256sum }}
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.setup.macos-deployment-version }}
TARGET_ARCH: ${{ matrix.setup.target-arch }}
CODESIGN: 0
steps:
- uses: actions/checkout@v4
Expand All @@ -45,13 +51,12 @@ jobs:
- name: Install dependencies
run: |
pip3 install -r requirements-build.txt
pip3 install -r requirements-macos-${MACOSX_DEPLOYMENT_TARGET}.txt
pip3 install --no-binary "charset-normalizer,PyYAML" -r requirements-macos-${MACOSX_DEPLOYMENT_TARGET}.txt
env:
PYINSTALLER_COMPILE_BOOTLOADER: "1"
- name: Run tests
timeout-minutes: 30
run: |
python3 setup.py test
run: pytest --verbose
- name: Prepare code signing certificate
run: |
if [ -n "$CODESIGN_MACOS_P12_URL" ] && [ -n "$AWS_ACCESS_KEY_ID" ]; then
Expand All @@ -78,5 +83,5 @@ jobs:
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: macos-app-${{ matrix.setup.macos-deployment-version }}
name: macos-app-${{ matrix.setup.macos-deployment-version }}-${{ matrix.setup.target-arch }}
path: artifacts/
46 changes: 12 additions & 34 deletions .github/workflows/package-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
python-version: 3.13
cache: 'pip'
- name: Install dependencies (Linux)
if: runner.os == 'linux'
run: |
Expand All @@ -25,16 +26,16 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install --upgrade build pytest
pip install --upgrade -r requirements.txt
- name: Run tests
timeout-minutes: 30
run: |
python setup.py test
pytest
- name: Build Python source distribution
run: |
git clean -dfx
python setup.py clean sdist --formats=gztar,zip
python -m build --sdist
- name: Prepare GPG signing key
run: |
if [ -n "$CODESIGN_GPG_URL" ] && [ -n "$AWS_ACCESS_KEY_ID" ]; then
Expand All @@ -56,7 +57,7 @@ jobs:
- name: Sign source archives
if: env.CODESIGN == '1'
run: |
for f in dist/*.{zip,tar.gz}; do
for f in dist/*.tar.gz; do
gpg --armor --local-user "$CODESIGN_GPG_IDENTITY" --output "${f}.asc" --detach-sig "$f"
done
env:
Expand All @@ -76,14 +77,15 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-11, windows-2019]
python-version: ['3.9', '3.10', '3.11', '3.12']
os: [macos-13, windows-2019]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install gettext (macOS)
if: runner.os == 'macOS'
run: |
Expand All @@ -108,42 +110,18 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools wheel
python -m pip install --upgrade build pytest
pip install --upgrade -r requirements.txt
- name: Run tests
timeout-minutes: 30
run: |
python setup.py test
pytest
- name: Build Python binary distribution
run: |
python setup.py clean bdist_wheel
python -m build --wheel
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: picard-bdist-${{ runner.os }}-${{ matrix.python-version }}
path: dist/*.whl

pypi-release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs:
- pypi-bdist
- pypi-sdist
environment:
name: pypi
url: https://pypi.org/p/picard
permissions:
id-token: write # required for PyPI upload
steps:
- uses: actions/download-artifact@v4
with:
pattern: picard-?dist*
path: dist/
merge-multiple: true
- name: Prepare distributions
run: |
ls -l dist/
# Remove zip source distribution (only a single sdist is allowed)
rm dist/picard-*.zip*
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
135 changes: 65 additions & 70 deletions .github/workflows/package-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ jobs:
runs-on: windows-2019
strategy:
matrix:
type:
- store-app
- signed-app
- installer
- portable
setup:
- type: installer
- type: portable
build-portable: 1
- type: store-app
disable-autoupdate: 1
fail-fast: false
env:
CODESIGN: 0
CODESIGN: ${{ !!secrets.AZURE_CERT_PROFILE_NAME }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -25,16 +26,17 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
python-version: 3.13
cache: 'pip'
cache-dependency-path: |
requirements-build.txt
requirements-win.txt
- name: Setup Windows build environment
run: |
& .\scripts\package\win-setup.ps1 `
-DiscidVersion $Env:DISCID_VERSION -DiscidSha256Sum $Env:DISCID_SHA256SUM `
-FpcalcVersion $Env:FPCALC_VERSION -FpcalcSha256Sum $Env:FPCALC_SHA256SUM
Add-Content $env:GITHUB_PATH "C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64"
$ReleaseTag = $(git describe --match "release-*" --abbrev=0 --always HEAD)
$BuildNumber = $(git rev-list --count "$ReleaseTag..HEAD")
Add-Content $env:GITHUB_ENV "BUILD_NUMBER=$BuildNumber"
New-Item -Name .\artifacts -ItemType Directory
env:
DISCID_VERSION: 0.6.4
Expand All @@ -57,80 +59,73 @@ jobs:
- name: Patch build version
if: startsWith(github.ref, 'refs/tags/') != true
run: |
$ReleaseTag = $(git describe --match "release-*" --abbrev=0 --always HEAD)
$BuildNumber = $(git rev-list --count "$ReleaseTag..HEAD")
python setup.py patch_version --platform=$Env:BUILD_NUMBER.$(git rev-parse --short HEAD)
- name: Run tests
timeout-minutes: 30
run: python setup.py test
- name: Prepare code signing certificate
if: matrix.type != 'store-app'
run: pytest --verbose
- name: Prepare clean build environment
run: |
If ($Env:CODESIGN_P12_URL -And $Env:AWS_ACCESS_KEY_ID) {
pip install awscli
aws s3 cp "$Env:CODESIGN_P12_URL" .\codesign.pfx
Add-Content $env:GITHUB_ENV "CODESIGN=1"
} Else {
Write-Output "::warning::No code signing certificate available, skipping code signing."
}
env:
AWS_DEFAULT_REGION: eu-central-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
CODESIGN_P12_URL: ${{ secrets.CODESIGN_P12_URL }}
- name: Build Windows 10 store app package
if: matrix.type == 'store-app'
Remove-Item -Path build,dist/picard,locale -Recurse -ErrorAction Ignore
python setup.py clean
- name: Build
run: |
& .\scripts\package\win-package-appx.ps1 -BuildNumber $Env:BUILD_NUMBER
Move-Item .\dist\*.msix .\artifacts
python setup.py build --build-number=$BuildNumber
python setup.py build_ext
pyinstaller --noconfirm --clean picard.spec
If ($env:PICARD_BUILD_PORTABLE -ne "1") {
dist\picard\_internal\fpcalc -version
}
env:
PICARD_APPX_PUBLISHER: CN=0A9169B7-05A3-4ED9-8876-830F17846709
- name: Build Windows 10 signed app package
if: matrix.type == 'signed-app' && env.CODESIGN == '1'
run: |
$CertificateFile = ".\codesign.pfx"
$CertificatePassword = ConvertTo-SecureString -String $Env:CODESIGN_P12_PASSWORD -Force -AsPlainText
& .\scripts\package\win-package-appx.ps1 -BuildNumber $Env:BUILD_NUMBER `
-CertificateFile $CertificateFile -CertificatePassword $CertificatePassword
Move-Item .\dist\*.msix .\artifacts
env:
CODESIGN_P12_PASSWORD: ${{ secrets.CODESIGN_P12_PASSWORD }}
PICARD_BUILD_PORTABLE: ${{ matrix.setup.build-portable }}
PICARD_DISABLE_AUTOUPDATE: ${{ matrix.setup.disable-autoupdate }}
- name: Sign picard.exe
uses: azure/[email protected]
if: matrix.setup.type != 'portable' && env.CODESIGN == 'true'
with:
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
endpoint: ${{ secrets.AZURE_ENDPOINT }}
trusted-signing-account-name: ${{ secrets.AZURE_CODE_SIGNING_NAME }}
certificate-profile-name: ${{ secrets.AZURE_CERT_PROFILE_NAME }}
files-folder: dist\picard
files-folder-filter: exe
files-folder-recurse: true
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
- name: Build Windows installer
if: matrix.type == 'installer'
if: matrix.setup.type == 'installer'
run: |
# choco install nsis
If ($Env:CODESIGN -eq "1") {
$CertificateFile = ".\codesign.pfx"
$CertificatePassword = ConvertTo-SecureString -String $Env:CODESIGN_P12_PASSWORD -Force -AsPlainText
} Else {
$CertificateFile = $null
$CertificatePassword = $null
}
& .\scripts\package\win-package-installer.ps1 -BuildNumber $Env:BUILD_NUMBER `
-CertificateFile $CertificateFile -CertificatePassword $CertificatePassword
makensis.exe /INPUTCHARSET UTF8 installer\picard-setup.nsi
Move-Item .\installer\*.exe .\artifacts
dist\picard\_internal\fpcalc -version
env:
CODESIGN_P12_PASSWORD: ${{ secrets.CODESIGN_P12_PASSWORD }}
- name: Build Windows portable app
if: matrix.type == 'portable'
if: matrix.setup.type == 'portable'
run: |
If ($Env:CODESIGN -eq "1") {
$CertificateFile = ".\codesign.pfx"
$CertificatePassword = ConvertTo-SecureString -String $Env:CODESIGN_P12_PASSWORD -Force -AsPlainText
} Else {
$CertificateFile = $null
$CertificatePassword = $null
}
& .\scripts\package\win-package-portable.ps1 -BuildNumber $Env:BUILD_NUMBER `
-CertificateFile $CertificateFile -CertificatePassword $CertificatePassword
Move-Item .\dist\*.exe .\artifacts
env:
CODESIGN_P12_PASSWORD: ${{ secrets.CODESIGN_P12_PASSWORD }}
- name: Cleanup
if: env.CODESIGN == '1'
run: Remove-Item .\codesign.pfx
- name: Build Windows 10 store app package
if: matrix.setup.type == 'store-app'
run: |
& .\scripts\package\win-package-appx.ps1 dist\picard
Move-Item .\dist\*.msix .\artifacts
- name: Sign final executable
uses: azure/[email protected]
if: matrix.setup.type != 'store-app' && env.CODESIGN == 'true'
with:
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
endpoint: ${{ secrets.AZURE_ENDPOINT }}
trusted-signing-account-name: ${{ secrets.AZURE_CODE_SIGNING_NAME }}
certificate-profile-name: ${{ secrets.AZURE_CERT_PROFILE_NAME }}
files-folder: artifacts
files-folder-filter: exe
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
- name: Archive production artifacts
uses: actions/upload-artifact@v4
if: matrix.type != 'signed-app' || env.CODESIGN == '1'
with:
name: windows-${{ matrix.type }}
name: windows-${{ matrix.setup.type }}
path: artifacts/
27 changes: 25 additions & 2 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,43 @@ jobs:
permissions:
id-token: write

pypi-release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs:
- package-pypi
environment:
name: pypi
url: https://pypi.org/p/picard
permissions:
id-token: write # required for PyPI upload
steps:
- uses: actions/download-artifact@v4
with:
pattern: picard-?dist*
path: dist/
merge-multiple: true
- name: Prepare distributions
run: |
ls -l dist/
# Remove zip source distribution (only a single sdist is allowed)
rm dist/picard-*.zip*
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

github-release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs:
- package-macos
- package-windows
- package-pypi
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
python-version: 3.13
- uses: actions/download-artifact@v4
with:
name: macos-app-10.14
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Ruff
on: [ push, pull_request ]
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/ruff-action@v3
with:
version: "latest"
Loading