-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.5 KB
/
Copy pathrelease.yml
File metadata and controls
55 lines (46 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Build and Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
runs-on: macos-14
steps:
- uses: actions/checkout@v5
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_15.2.app
- name: Build
run: |
cd Hangar
VERSION="${GITHUB_REF_NAME#v}"
echo "Building version $VERSION (build ${GITHUB_RUN_NUMBER})"
xcodebuild -scheme Hangar \
-configuration Release \
-derivedDataPath build \
MARKETING_VERSION="$VERSION" \
CURRENT_PROJECT_VERSION="${GITHUB_RUN_NUMBER}" \
CODE_SIGN_IDENTITY="-" \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO
- name: Ad-hoc sign
run: |
APP=Hangar/build/Build/Products/Release/Hangar.app
codesign --force --deep --sign - "$APP"
codesign --verify --verbose "$APP"
- name: Create DMG
run: |
python3 -m venv .dmgvenv
.dmgvenv/bin/pip install --quiet dmgbuild==1.6.7
DMG_APP="Hangar/build/Build/Products/Release/Hangar.app" \
DMG_BACKGROUND="$PWD/packaging/dmg-background.tiff" \
.dmgvenv/bin/dmgbuild -s packaging/dmg_settings.py "Hangar" Hangar.dmg
- name: Upload Release
uses: softprops/action-gh-release@v2
with:
files: Hangar.dmg
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}