Skip to content

Preserve unsigned build artifacts in dry run workflow#171

Merged
schuyler merged 10 commits intomainfrom
claude/check-release-artifact-upload-01YD4Cqx12wNLce8FtdtMjMb
Nov 23, 2025
Merged

Preserve unsigned build artifacts in dry run workflow#171
schuyler merged 10 commits intomainfrom
claude/check-release-artifact-upload-01YD4Cqx12wNLce8FtdtMjMb

Conversation

@schuyler
Copy link
Copy Markdown
Owner

Summary

The dry run workflow (build-release.yml) now preserves the unsigned app bundle as a zip artifact on every merge to main, making it available for testing and inspection.

Changes

  • Archive app bundle as a zip file with commit SHA in the filename
  • Upload to artifacts with 7-day retention
  • Error handling with explicit validation and diagnostic output
  • Artifact names follow the pattern: MacDown-3000-build-${commit-sha}.zip

Motivation

Previously, the dry run workflow only uploaded logs on failure. Now successful builds are preserved as downloadable artifacts, allowing easy access to unsigned test builds without rebuilding locally.

Testing

The workflow runs on every push to main and pull request to main. Verify by checking the artifacts in a workflow run.

The dry run workflow now uploads the built .dmg file as an artifact, making it available for inspection and testing on every merge to main. The artifact is retained for 30 days.
Keep the unsigned DMG artifacts for one week instead of 30 days to manage storage.
The artifact name now includes the first 8 characters of the commit SHA, making it easier to identify which build produced which artifact.
The .dmg file is now renamed to MacDown-3000-build-${commit-sha}.dmg before uploading, making the actual artifact filename include the commit identifier.
For the dry run, we archive the .app bundle as a tar.gz instead of creating a full DMG. This is simpler and sufficient for preserving the unsigned build for testing.
The macos-14 runner has zip utility built-in, and it's more user-friendly for macOS users than tar.gz.
Ensure the zip command succeeds with explicit error exit, and display the archive size for verification.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 23, 2025

Code Coverage Report

Current Coverage: 41.12%

Coverage Details (Summary)
Name                                                                                                                                   Coverage            
-------------------------------------------------------------------------------------------------------------------------------------- ------------------- 
MASPreferences.bundle                                                                                                                  0.00% (0/0)         
MacDown 3000.app                                                                                                                       54.08% (6721/12429) 
    /Users/runner/work/macdown3000/macdown3000/MacDown/Code/Document/MPAsset.m                                                         92.79% (103/111)    
        -[MPAsset typeName]                                                                                                            100.00% (3/3)       
        -[MPAsset defaultTypeName]                                                                                                     100.00% (3/3)       
        +[MPAsset assetWithURL:andType:]                                                                                               100.00% (3/3)       
        -[MPAsset initWithURL:andType:]                                                                                                87.50% (7/8)        
        -[MPAsset init]                                                                                                                100.00% (3/3)       
        -[MPAsset templateForOption:]                                                                                                  0.00% (0/6)         
        -[MPAsset htmlForOption:]                                                                                                      96.43% (27/28)      
        -[MPStyleSheet defaultTypeName]                                                                                                100.00% (3/3)       
        +[MPStyleSheet CSSWithURL:]                                                                                                    100.00% (3/3)       
        -[MPStyleSheet templateForOption:]                                                                                             100.00% (20/20)     
        -[MPScript defaultTypeName]                                                                                                    100.00% (3/3)       
        +[MPScript javaScriptWithURL:]                                                                                                 100.00% (3/3)       
        -[MPScript templateForOption:]                                                                                                 100.00% (20/20)     
        -[MPEmbeddedScript htmlForOption:]                                                                                             100.00% (5/5)       
    /Users/runner/work/macdown3000/macdown3000/MacDown/Code/Extension/DOMNode+Text.m                                                   0.00% (0/94)        
        -[NSString(WordCount) numberOfWords]                                                                                           0.00% (0/11)        
        __36-[NSString(WordCount) numberOfWords]_block_invoke                                                                          0.00% (0/3)         
        -[NSString(WordCount) lengthWithoutNewlines]                                                                                   0.00% (0/11)        
        __44-[NSString(WordCount) lengthWithoutNewlines]_block_invoke                                                                  0.00% (0/3)         
        -[NSString(WordCount) lengthWithoutWhitespacesAndNewlines]                                                                     0.00% (0/11)        
        __58-[NSString(WordCount) lengthWithoutWhitespacesAndNewlines]_block_invoke                                                    0.00% (0/3)         
        MPGetChildrenNodetextCount                                                                                                     0.00% (0/6)         
        MPGetNodeTextCount                                                                                                             0.00% (0/38)        
        -[DOMNode(Text) textCount]                                                                                                     0.00% (0/8)         
    /Users/runner/work/macdown3000/macdown3000/Dependency/peg-markdown-highlight/HGMarkdownHighlightingStyle.m                         87.69% (57/65)      
        +[HGMarkdownHighlightingStyle colorFromARGBColor:]                                                                             100.00% (6/6)       
        -[HGMarkdownHighlightingStyle initWithType:attributesToAdd:toRemove:fontTraitsToAdd:]                                          88.89% (8/9)        
        -[HGMarkdownHighlightingStyle initWithStyleAttributes:baseFont:]                                                               86.00% (43/50)      
    /Users/runner/work/macdown3000/macdown3000/MacDown/Code/Utility/MPPlugIn.m                                                         0.00% (0/36)        
        -[MPPlugIn setName:]                                                                                                           0.00% (0/3)         
        -[MPPlugIn initWithBundle:]                                                                                                    0.00% (0/24)        
        -[MPPlugIn plugInDidInitialize]                                                                                                0.00% (0/4)         
        -[MPPlugIn run:]                                                                                                               0.00% (0/5)         
    /Users/runner/work/macdown3000/macdown3000/MacDown/Code/Extension/hoedown_html_patch.c                                             73.64% (95/129)     
        hoedown_patch_render_blockcode                                                                                                 89.09% (49/55)      
        hoedown_patch_render_listitem                                                                                                  100.00% (46/46)     
        hoedown_patch_render_toc_header                                                                                                0.00% (0/28)        
    /Users/runner/work/macdown3000/macdown3000/MacDown/Code/Application/MPMainController.m                                             40.76% (97/238)     
        MPOpenBundledFile                                                                                                              95.24% (20/21)      
        __MPOpenBundledFile_block_invoke                                                                                               85.71% (6/7)        
        treat                                                                                                                          20.00% (6/30)       
        __treat_block_invoke                                                                                                           0.00% (0/3)         
        -[MPMainController applicationDidFinishLaunching:]                                                                             100.00% (6/6)       
        -[MPMainController openUrlSchemeAppleEvent:withReplyEvent:]                                                                    0.00% (0/45)        
        __59-[MPMainController openUrlSchemeAppleEvent:withReplyEvent:]_block_invoke                                                   0.00% (0/7)         

... (2056 more lines truncated)

📊 **Full coverage report available in workflow artifacts**

- Artifact name no longer duplicates the .zip extension
- Archive and upload steps only run on push events (merges to main), not pull requests
Remove the redundant push event trigger. Tests will now run only on pull requests to main/develop branches, where they serve as the review checkpoint. The build-release.yml dry run already validates that the build works on merge to main.
@schuyler schuyler merged commit fc61e34 into main Nov 23, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants