GitHub Actions Workflows
July 25, 2025 ยท View on GitHub
This directory contains GitHub Actions workflows for the TrackWeight project.
build-and-sign-dmg.yml
This workflow builds, signs (if certificates are provided), and packages the TrackWeight macOS application into a DMG file.
Features
- Automated Building: Builds the Xcode project using the latest stable Xcode
- Code Signing: Supports optional code signing with certificates
- DMG Creation: Creates a professional DMG with proper layout and attribution
- Attribution: Includes proper credits to the original repository (https://github.com/KrishKrosh/TrackWeight)
- Release Integration: Can create GitHub releases with the built DMG
- Artifact Upload: Uploads DMG as a GitHub Actions artifact
Triggers
The workflow runs on:
- Git tags starting with 'v' (e.g., v1.0.0)
- Published releases
- Manual workflow dispatch
Setup Instructions
Required Secrets (for signed builds)
To enable code signing, add these secrets to your GitHub repository:
-
BUILD_CERTIFICATE_BASE64: Base64-encoded Developer ID Application certificate (.p12 file)
base64 -i YourCertificate.p12 | pbcopy -
P12_PASSWORD: Password for the .p12 certificate file
-
BUILD_PROVISION_PROFILE_BASE64: Base64-encoded provisioning profile (optional for Developer ID)
base64 -i YourProvisioningProfile.mobileprovision | pbcopy
Setting up Certificates
- Export your Developer ID Application certificate from Keychain Access as a .p12 file
- Convert to base64 and add as
BUILD_CERTIFICATE_BASE64secret - Add the certificate password as
P12_PASSWORDsecret
Unsigned Builds
If you don't have code signing certificates, the workflow will automatically create an unsigned development build. These builds can still be used but may require users to manually allow them in System Preferences.
build-unsigned-dmg.yml
This workflow specifically builds unsigned development versions of the TrackWeight app without requiring any certificates.
Features
- No Certificate Requirements: Builds completely without code signing
- Development Build: Creates unsigned development builds that work on any Mac
- Same DMG Features: Includes all the same DMG features as the signed version
- Clear User Instructions: Includes instructions for running unsigned apps
- Attribution: Maintains proper credits to the original repository
Triggers
The workflow runs on:
- Pushes to main branches and the current working branch
- Manual workflow dispatch
Benefits
- Easy Testing: Perfect for testing builds without setting up certificates
- No Configuration: Works immediately without any secrets or setup
- User-Friendly: Includes clear instructions for users on how to run unsigned apps
Choosing the Right Workflow
Use build-and-sign-dmg.yml when:
- You have Apple Developer certificates
- You want to distribute signed, trusted builds
- You're creating official releases
Use build-unsigned-dmg.yml when:
- You don't have certificates
- You want to test builds quickly
- You're developing or experimenting
- You need a simple build process
If no signing certificates are provided, the workflow will create an unsigned development build that can still be distributed and run locally (users may need to allow it in System Preferences > Security & Privacy).
Usage
Manual Trigger
- Go to Actions tab in your GitHub repository
- Select "Build and Sign DMG" workflow
- Click "Run workflow"
- Optionally check "Create a GitHub release" to create a release
Automatic Trigger
- Create a git tag:
git tag v1.0.0 - Push the tag:
git push origin v1.0.0 - The workflow will automatically build and create a release
Output
The workflow produces:
- DMG file: TrackWeight-{version}.dmg containing the app and attribution
- GitHub Release: (if triggered by tag or manual release creation)
- Artifacts: DMG file uploaded as GitHub Actions artifact
Attribution
This workflow ensures proper attribution to the original TrackWeight repository:
- README.txt file included in DMG with credits
- Release notes include attribution
- Links to original repository: https://github.com/KrishKrosh/TrackWeight
update-homebrew.yml
This workflow automatically updates the Homebrew cask when a new release is published.
Features
- Updates version in Homebrew tap repository
- Automatically triggered on release publication
- Can be manually triggered with version input
For more information about the original TrackWeight project, visit: https://github.com/KrishKrosh/TrackWeight