-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from t123yh/master
Create release on tag; build and push macOS .dmg on release
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Create macOS release on tag push | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Qt | ||
uses: jurplel/install-qt-action@v3 | ||
with: | ||
modules: qtwebengine | ||
- name: qmake | ||
run: qmake qserial.pro | ||
- name: make | ||
run: make | ||
- name: Change libusb path | ||
run: install_name_tool -change /usr/local/opt/libusb/lib/libusb-1.0.0.dylib @executable_path/../Frameworks/libusb-1.0.0.dylib QSerial.app/Contents/MacOS/QSerial | ||
- name: Copy libusb to frameworks | ||
run: mkdir -p QSerial.app/Contents/Frameworks && cp /usr/local/lib/libusb-1.0.0.dylib QSerial.app/Contents/Frameworks/libusb-1.0.0.dylib | ||
- name: Qt mac deploy to .dmg | ||
run: macdeployqt QSerial.app -verbose=1 -dmg | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: QSerial.dmg | ||
|
||
permissions: | ||
contents: write |