|
| 1 | +name: Manual Release |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + version: |
| 7 | + description: 'Release version' |
| 8 | + required: true |
| 9 | + |
| 10 | + |
| 11 | +jobs: |
| 12 | + build-linux: |
| 13 | + runs-on: ubuntu-latest |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v2 |
| 16 | + - name: Set up Go |
| 17 | + uses: actions/setup-go@v2 |
| 18 | + with: |
| 19 | + go-version: 1.22 |
| 20 | + - name: Install fyne-cross |
| 21 | + run: go install github.com/fyne-io/fyne-cross@latest |
| 22 | + - name: Cross-compile for Linux |
| 23 | + run: fyne-cross linux |
| 24 | + |
| 25 | + - name: Prepare DEB package |
| 26 | + run: | |
| 27 | + mkdir -p .debpkg/DEBIAN |
| 28 | + echo "Package: SoundscapeSync" > .debpkg/DEBIAN/control |
| 29 | + echo "Version: 1.0" >> .debpkg/DEBIAN/control |
| 30 | + echo "Architecture: amd64" >> .debpkg/DEBIAN/control |
| 31 | + echo "Maintainer: Dominik Polakovics <[email protected]>" >> .debpkg/DEBIAN/control |
| 32 | + mkdir -p .debpkg/usr/bin |
| 33 | + cp fyne-cross/bin/linux-amd64/soundscape-sync .debpkg/usr/bin |
| 34 | + - name: Create DEB package |
| 35 | + uses: jiro4989/build-deb-action@v3 |
| 36 | + with: |
| 37 | + package: SoundscapeSync |
| 38 | + package_root: .debpkg |
| 39 | + maintainer: "Dominik Polakovics <[email protected]>" |
| 40 | + version: 1.0 |
| 41 | + arch: 'amd64' |
| 42 | + desc: 'This is my sample package.' |
| 43 | + depends: 'ffmpeg' |
| 44 | + - name: get file name |
| 45 | + run: | |
| 46 | + mv *.deb soundscapesync-1.0.deb |
| 47 | +
|
| 48 | + - name: Upload Linux artifact |
| 49 | + uses: actions/upload-artifact@v3 |
| 50 | + with: |
| 51 | + name: linux-build |
| 52 | + path: fyne-cross/bin/linux-amd64 |
| 53 | + - name: Upload Debian artifact |
| 54 | + uses: actions/upload-artifact@v3 |
| 55 | + with: |
| 56 | + name: debian-build |
| 57 | + path: soundscapesync-1.0.deb |
| 58 | + |
| 59 | + build-windows: |
| 60 | + runs-on: ubuntu-latest |
| 61 | + steps: |
| 62 | + - uses: actions/checkout@v2 |
| 63 | + - name: Set up Go |
| 64 | + uses: actions/setup-go@v2 |
| 65 | + with: |
| 66 | + go-version: 1.22 |
| 67 | + - name: Install fyne-cross |
| 68 | + run: go install github.com/fyne-io/fyne-cross@latest |
| 69 | + - name: Cross-compile for Windows |
| 70 | + run: fyne-cross windows |
| 71 | + - name: Cross-compile for Linux |
| 72 | + run: fyne-cross linux |
| 73 | + - name: Upload Windows artifact |
| 74 | + uses: actions/upload-artifact@v3 |
| 75 | + with: |
| 76 | + name: windows-build |
| 77 | + path: fyne-cross/bin/windows-amd64 |
| 78 | + |
| 79 | + build-mac: |
| 80 | + runs-on: macos-13 |
| 81 | + steps: |
| 82 | + - uses: actions/checkout@v2 |
| 83 | + - name: Set up Go |
| 84 | + uses: actions/setup-go@v2 |
| 85 | + with: |
| 86 | + go-version: 1.22 |
| 87 | + - name: Install fyne |
| 88 | + run: go install fyne.io/fyne/v2/cmd/fyne@latest |
| 89 | + - name: Build Fyne application for macOS |
| 90 | + run: fyne package -os darwin -icon Icon.png |
| 91 | + - name: Upload macOS artifact |
| 92 | + uses: actions/upload-artifact@v3 |
| 93 | + with: |
| 94 | + name: macos-build |
| 95 | + path: SoundscapeSync.app |
| 96 | + |
| 97 | + create-release: |
| 98 | + runs-on: ubuntu-latest |
| 99 | + steps: |
| 100 | + - uses: actions/download-artifact@v4 |
| 101 | + with: |
| 102 | + name: linux-build |
| 103 | + - uses: actions/download-artifact@v4 |
| 104 | + with: |
| 105 | + name: windows-build |
| 106 | + - uses: actions/download-artifact@v4 |
| 107 | + with: |
| 108 | + name: macos-build |
| 109 | + - name: show folders |
| 110 | + run: | |
| 111 | + ls -al |
| 112 | + ls -al macos-build/ |
0 commit comments