-
-
Notifications
You must be signed in to change notification settings - Fork 0
150 lines (141 loc) · 5.38 KB
/
release.yml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
name: Manual Release
on:
push:
tags:
- 'v*.*' # Adjust this pattern based on your tagging
permissions:
contents: write
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Install fyne-cross
run: go install github.com/fyne-io/fyne-cross@latest
- name: Cross-compile for Linux
run: fyne-cross linux
- name: Upload Linux artifact
uses: actions/upload-artifact@v4
with:
name: linux-build
path: fyne-cross/bin/linux-amd64
build-windows:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Install fyne-cross
run: go install github.com/fyne-io/fyne-cross@latest
- name: Cross-compile for Windows
run: fyne-cross windows
- name: Upload Windows artifact
uses: actions/upload-artifact@v4
with:
name: windows-build
path: fyne-cross/bin/windows-amd64
# build-mac:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v4
# - name: Set up Go
# uses: actions/setup-go@v5
# with:
# go-version: 1.22
# - name: Build Fyne application for macOS
# # run: fyne package -os darwin -icon Icon.png
# run: GOOS=darwin GOARCH=arm64 go build -o SoundscapeSync.app
# - name: Upload macOS artifact
# uses: actions/upload-artifact@v4
# with:
# name: macos-build
# path: SoundscapeSync.app
create-release:
runs-on: ubuntu-latest
# needs: [build-linux, build-windows, build-mac]
needs: [build-windows, build-linux]
steps:
- name: Generate Changelog
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub token for authentication
with:
tag_name: ${{ github.ref_name }} # Tag name from the push event
release_name: Release ${{ github.ref_name }} # Name of the release
body: ${{ steps.changelog.outputs.changes }}
draft: false # Set to true if you want to create a draft release
prerelease: true # Set to true if this is a prerelease
# - uses: actions/download-artifact@v4
# with:
# name: linux-build
# - name: Prepare DEB package
# run: |
# mkdir -p .debpkg/DEBIAN
# echo "Package: SoundscapeSync" > .debpkg/DEBIAN/control
# echo "Version: ${{ github.event.inputs.version }}" >> .debpkg/DEBIAN/control
# echo "Architecture: amd64" >> .debpkg/DEBIAN/control
# echo "Maintainer: Dominik Polakovics <[email protected]>" >> .debpkg/DEBIAN/control
# mkdir -p .debpkg/usr/bin
# cp fyne-cross/bin/linux-amd64/soundscape-sync .debpkg/usr/bin
# - name: Create DEB package
# uses: jiro4989/build-deb-action@v3
# with:
# package: SoundscapeSync
# package_root: .debpkg
# maintainer: "Dominik Polakovics <[email protected]>"
# version: "${{ github.event.inputs.version }}"
# arch: 'amd64'
# desc: 'This is my sample package.'
# depends: 'ffmpeg'
# - name: get file name
# run: |
# mv *.deb soundscapesync-${{ github.event.inputs.version }}.deb
- uses: actions/download-artifact@v4
with:
name: linux-build
- name: Upload Linux Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub token for authentication
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # URL for uploading assets
asset_path: soundscape-sync # Path to your asset file
asset_name: soundscape-sync-linux-x86 # Name of the asset file
asset_content_type: application/octet-stream # Content type of the asset
- uses: actions/download-artifact@v4
with:
name: windows-build
- name: Upload Windows Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub token for authentication
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # URL for uploading assets
asset_path: SoundscapeSync.exe # Path to your asset file
asset_name: SoundscapeSync.exe # Name of the asset file
asset_content_type: application/x-msdownload # Content type of the asset
# - uses: actions/download-artifact@v4
# with:
# name: macos-build
# - name: Upload MacOS Asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub token for authentication
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }} # URL for uploading assets
# asset_path: SoundscapeSync.app # Path to your asset file
# asset_name: SoundscapeSync.app # Name of the asset file
# asset_content_type: application/octet-stream # Content type of the asset