This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
chore: bump Build Number to 2 (#2) #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI - Build Application | |
on: | |
push: | |
branches: | |
- '**' | |
paths-ignore: | |
- 'LICENSE' | |
- '**.md' | |
pull_request: | |
release: | |
types: [created] | |
workflow_dispatch: | |
permissions: | |
write-all | |
jobs: | |
build-mac: | |
name: Build for macOS (Universal) | |
runs-on: macos-13 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# - name: Set node | |
# uses: actions/setup-node@v4 | |
# with: | |
# node-version: 20.x | |
# - name: Set up Homebrew | |
# id: set-up-homebrew | |
# uses: Homebrew/actions/setup-homebrew@master | |
# - name: Install dependencies | |
# run: | | |
# brew install graphicsmagick imagemagick | |
- name: Set up env.APP_CONF to Debug | |
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' | |
run: | | |
echo "APP_CONF=Debug" >> $GITHUB_ENV | |
- name: Set up env.APP_CONF to Release | |
if: github.event_name == 'release' | |
run: | | |
echo "APP_CONF=Release" >> $GITHUB_ENV | |
- name: Build for macOS (Universal) | |
shell: bash | |
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' | |
run: | | |
xcodebuild -project 'InjectGUI.xcodeproj' -scheme 'InjectGUI' -configuration '${{ env.APP_CONF }}' -destination 'platform=macOS' build -derivedDataPath 'build' | |
- name: Create DMG | |
shell: bash | |
run: | | |
hdiutil create -volname "InjectGUI" -srcfolder "build/Build/Products/${{ env.APP_BUILD }}/InjectGUI.app" -ov -format UDZO "InjectGUI.dmg" | |
# - name: Create DMG | |
# run: | | |
# npm install --global create-dmg | |
# create-dmg 'build/Build/Products/Release/InjectGUI.app' --overwrite --dmg-title='InjectGUI' | |
- name: Upload DMG Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: InjectGUI | |
path: InjectGUI.dmg | |
- name: Upload DMG to GitHub Release | |
if: github.event_name == 'release' | |
uses: actions/[email protected] | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: InjectGUI.dmg | |
asset_name: InjectGUI.dmg | |
asset_content_type: application/x-apple-diskimage |