Skip to content

Commit

Permalink
ci(build): application building CI support (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
wibus-wee committed Jul 16, 2023
1 parent fa8e01d commit 21d7460
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build
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-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build for macOS (Universal)
shell: bash
run: |
xcodebuild -project 'ProcessReporter.xcodeproj' -scheme 'ProcessReporter' -configuration 'Release' -destination 'platform=macOS' build -derivedDataPath 'build'
- name: Create DMG
shell: bash
run: |
hdiutil create -volname "ProcessReporter" -srcfolder "build/Build/Products/Release/ProcessReporter.app" -ov -format UDZO "ProcessReporter.dmg"
- name: Upload DMG Artifact
uses: actions/upload-artifact@v3
with:
name: ProcessReporter.dmg
path: ProcessReporter.dmg
- name: Upload DMG to GitHub Release
if: github.event_name == 'release'
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ProcessReporter.dmg
asset_name: ProcessReporter.dmg
asset_content_type: application/x-apple-diskimage

0 comments on commit 21d7460

Please sign in to comment.