-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ChienNM3
committed
Jan 28, 2024
1 parent
1b3e03b
commit 8467bd0
Showing
4 changed files
with
97 additions
and
1 deletion.
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,66 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
build: | ||
- { name: 'TorPlayer-darwin', os: 'macos-latest' } | ||
|
||
runs-on: ${{ matrix.build.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# Setup Golang | ||
- name: Setup Golang | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.21 | ||
check-latest: true | ||
- run: go version | ||
shell: bash | ||
|
||
# Build MacOS | ||
- name: Build MacOS | ||
if: runner.os == 'macOS' | ||
run: | | ||
mkdir -p ./build/bin/TorPlayer.app/Contents/MacOS | ||
mkdir -p ./build/bin/TorPlayer.app/Contents/Resources | ||
cp ./build/darwin/Info.plist ./build/bin/TorPlayer.app/Contents | ||
cp ./build/darwin/iconfile.icns ./build/bin/TorPlayer.app/Contents/Resources | ||
go build -o build/bin/TorPlayer.app/Contents/MacOS/TorPlayer | ||
chmod +x build/bin/*/Contents/MacOS/* | ||
shell: bash | ||
|
||
# Package MacOS | ||
- name: Package MacOS | ||
if: runner.os == 'macOS' | ||
run: | | ||
productbuild --component ./build/bin/TorPlayer.app ./build/bin/TorPlayer.pkg | ||
shell: bash | ||
|
||
# Upload build assets | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: Build ${{matrix.build.name}} ${{runner.os}} | ||
path: | | ||
*/bin/*.pkg | ||
*\bin\*.exe | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
*/bin/*.{pkg,exe} | ||
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.idea | ||
**/.DS_Store | ||
**/.DS_Store | ||
build/bin |
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,29 @@ | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleName</key> | ||
<string>TorPlayer</string> | ||
<key>CFBundleExecutable</key> | ||
<string>TorPlayer</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>com.TorPlayer</string> | ||
<key>CFBundleVersion</key> | ||
<string>1.0.0</string> | ||
<key>CFBundleGetInfoString</key> | ||
<string>Built using Go</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0.0</string> | ||
<key>CFBundleIconFile</key> | ||
<string>iconfile</string> | ||
<key>LSMinimumSystemVersion</key> | ||
<string>10.13.0</string> | ||
<key>NSHighResolutionCapable</key> | ||
<string>true</string> | ||
<key>NSHumanReadableCopyright</key> | ||
<string>Copyright.........</string> | ||
|
||
|
||
</dict> | ||
</plist> |
Binary file not shown.