Skip to content

Release

Release #12

Workflow file for this run

name: Manual Release
on:
workflow_dispatch:
inputs:
version:
description: 'Release version'
required: true
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: Cross-compile for Linux
# run: fyne-cross linux
# - 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-xlarge
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Install fyne
run: go install fyne.io/fyne/v2/cmd/fyne@latest
- name: Build Fyne application for macOS
run: fyne package -os darwin -icon Icon.png
- 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-mac]
steps:
- 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.event.inputs.version }} # Tag name from the push event
release_name: Release ${{ github.event.inputs.version }} # Name of the release
draft: true # 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: 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: Unzip MacOS
run: |
zip -r SoundscapeSync.app Contents
UPLOAD_URL=${{ steps.create_release.outputs.upload_url }}
curl -X POST "$UPLOAD_URL?name=SoundscapeSync.app" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @SoundscapeSync.app
# - 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