@@ -53,19 +53,38 @@ jobs:
53
53
uses : actions/setup-go@v5
54
54
with :
55
55
go-version : 1.22
56
- - name : Build Fyne application for macOS
57
- # run: fyne package -os darwin -icon Icon.png
58
- run : GOOS=darwin GOARCH=arm64 go build -o SoundscapeSync.app
56
+ - name : Compile for MacOS
57
+ run : |
58
+ GOOS=darwin GOARCH=arm64 go build -o SoundscapeSync_arm64
59
+ CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -o SoundscapeSync_amd64
60
+ lipo -create -output SoundscapeSync SoundscapeSync_amd64 SoundscapeSync_arm64
61
+ mkdir -p SoundscapeSync.app/Contents/MacOS
62
+ mv SoundscapeSync SoundscapeSync.app/Contents/MacOS/SoundscapeSync
63
+ echo '<?xml version="1.0" encoding="UTF-8"?>' > SoundscapeSync.app/Contents/Info.plist
64
+ echo '<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">' >> SoundscapeSync.app/Contents/Info.plist
65
+ echo '<plist version="1.0">' >> SoundscapeSync.app/Contents/Info.plist
66
+ echo '<dict>' >> SoundscapeSync.app/Contents/Info.plist
67
+ echo ' <key>CFBundleName</key>' >> SoundscapeSync.app/Contents/Info.plist
68
+ echo ' <string>SoundscapeSync</string>' >> SoundscapeSync.app/Contents/Info.plist
69
+ echo ' <key>CFBundleVersion</key>' >> SoundscapeSync.app/Contents/Info.plist
70
+ echo ' <string>1.0</string>' >> SoundscapeSync.app/Contents/Info.plist
71
+ echo ' <key>CFBundleIdentifier</key>' >> SoundscapeSync.app/Contents/Info.plist
72
+ echo ' <string>com.cloonar.soundscape-sync</string>' >> SoundscapeSync.app/Contents/Info.plist
73
+ echo ' <key>Executable</key>' >> SoundscapeSync.app/Contents/Info.plist
74
+ echo ' <string>SoundscapeSync</string>' >> SoundscapeSync.app/Contents/Info.plist
75
+ echo '</dict>' >> SoundscapeSync.app/Contents/Info.plist
76
+ echo '</plist>' >> SoundscapeSync.app/Contents/Info.plist
77
+ chmod +x SoundscapeSync.app/Contents/MacOS/SoundscapeSync
78
+ zip -r SoundscapeSync.app.zip SoundscapeSync.app
59
79
- name : Upload macOS artifact
60
80
uses : actions/upload-artifact@v4
61
81
with :
62
82
name : macos-build
63
- path : SoundscapeSync.app
83
+ path : SoundscapeSync.app.zip
64
84
65
85
create-release :
66
86
runs-on : ubuntu-latest
67
- # needs: [build-linux, build-windows, build-mac]
68
- needs : [build-windows, build-linux]
87
+ needs : [build-linux, build-windows, build-mac]
69
88
steps :
70
89
- name : Generate Changelog
71
90
id : changelog
@@ -77,13 +96,13 @@ jobs:
77
96
id : create_release
78
97
uses : actions/create-release@v1
79
98
env :
80
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # GitHub token for authentication
99
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
81
100
with :
82
- tag_name : ${{ github.ref_name }} # Tag name from the push event
83
- release_name : Release ${{ github.ref_name }} # Name of the release
101
+ tag_name : ${{ github.ref_name }}
102
+ release_name : Release ${{ github.ref_name }}
84
103
body : ${{ steps.changelog.outputs.changes }}
85
- draft : false # Set to true if you want to create a draft release
86
- prerelease : true # Set to true if this is a prerelease
104
+ draft : false
105
+ prerelease : true
87
106
88
107
# - uses: actions/download-artifact@v4
89
108
# with:
@@ -116,35 +135,35 @@ jobs:
116
135
- name : Upload Linux Asset
117
136
uses : actions/upload-release-asset@v1
118
137
env :
119
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # GitHub token for authentication
138
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
120
139
with :
121
- upload_url : ${{ steps.create_release.outputs.upload_url }} # URL for uploading assets
122
- asset_path : soundscape-sync # Path to your asset file
123
- asset_name : soundscape-sync-linux-x86 # Name of the asset file
124
- asset_content_type : application/octet-stream # Content type of the asset
140
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
141
+ asset_path : soundscape-sync
142
+ asset_name : soundscape-sync-linux-x86
143
+ asset_content_type : application/octet-stream
125
144
126
145
- uses : actions/download-artifact@v4
127
146
with :
128
147
name : windows-build
129
148
- name : Upload Windows Asset
130
149
uses : actions/upload-release-asset@v1
131
150
env :
132
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # GitHub token for authentication
151
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
133
152
with :
134
- upload_url : ${{ steps.create_release.outputs.upload_url }} # URL for uploading assets
135
- asset_path : SoundscapeSync.exe # Path to your asset file
136
- asset_name : SoundscapeSync.exe # Name of the asset file
137
- asset_content_type : application/x-msdownload # Content type of the asset
153
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
154
+ asset_path : SoundscapeSync.exe
155
+ asset_name : SoundscapeSync.exe
156
+ asset_content_type : application/x-msdownload
138
157
139
- # - uses: actions/download-artifact@v4
140
- # with:
141
- # name: macos-build
142
- # - name: Upload MacOS Asset
143
- # uses: actions/upload-release-asset@v1
144
- # env:
145
- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub token for authentication
146
- # with:
147
- # upload_url: ${{ steps.create_release.outputs.upload_url }} # URL for uploading assets
148
- # asset_path: SoundscapeSync.app # Path to your asset file
149
- # asset_name: SoundscapeSync.app # Name of the asset file
150
- # asset_content_type: application/octet-stream # Content type of the asset
158
+ - uses : actions/download-artifact@v4
159
+ with :
160
+ name : macos-build
161
+ - name : Upload MacOS Asset
162
+ uses : actions/upload-release-asset@v1
163
+ env :
164
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
165
+ with :
166
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
167
+ asset_path : SoundscapeSync.app.zip
168
+ asset_name : MacOS
169
+ asset_content_type : application/zip
0 commit comments