Skip to content

Commit

Permalink
Update Release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
bunty95 authored Jul 5, 2024
1 parent 4953306 commit 15b6f70
Showing 1 changed file with 18 additions and 26 deletions.
44 changes: 18 additions & 26 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,60 +14,52 @@ jobs:
matrix:
macos: [ macos-13 ]
xcode: [ Xcode_15.2 ]
include:
- macos: macos-14
xcode: Xcode

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Install the Apple certificate and provisioning profile

- name: Investigate available XCode versions
run: ls -n /Applications/ | grep Xcode*
- name: Set XCode Version
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app
- name: install qt 5
run: brew install qt@5
- name: install build environment
run: scripts/darwin/install.sh
- name: Build project
env:
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
APP_PASSWORD: ${{ secrets.APP_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
TEAM_ID: ${{ secrets.TEAM_ID }}
run: |
# create variables
run:
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db

# import certificate and provisioning profile from secrets
echo -n "$APPLE_CERTIFICATE" | base64 --decode -o $CERTIFICATE_PATH

# create temporary keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH

# import certificate to keychain
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
- name: Check if Cert installed correctly
run: security find-identity -v -p codesigning

- name: Investigate available XCode versions
run: ls -n /Applications/ | grep Xcode*
- name: Set XCode Version
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app
- name: install qt 5
run: brew install qt@5
- name: install build environment
run: scripts/darwin/install.sh
- name: Build project
run: scripts/darwin/build.sh

scripts/darwin/build.sh

- name: Archive artifact
run: zip DLT-macOS-${{ matrix.macos }}.zip -r build/dist
run: zip DLT-macOS.zip -r build/dist
- name: Upload DLT artifact
uses: actions/upload-artifact@v4
with:
name: DLT-Mac
path: DLT-macOS-${{ matrix.macos }}.zip
path: DLT-macOS.zip

createRelease:
name: Create release
Expand All @@ -83,7 +75,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: DLT-Mac
path: DLT-macOS-${{ matrix.macos }}.zip
path: DLT-macOS.zip


- name: Find Tag
Expand Down

0 comments on commit 15b6f70

Please sign in to comment.