Skip to content

Commit

Permalink
change just to windows
Browse files Browse the repository at this point in the history
  • Loading branch information
dpolakovics committed Nov 4, 2024
1 parent 3869cb2 commit 5ec9dba
Showing 1 changed file with 43 additions and 51 deletions.
94 changes: 43 additions & 51 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,47 +29,47 @@ jobs:
# 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
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: 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
- 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: macos-build
path: SoundscapeSync.app
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-mac]
needs: [build-windows]
steps:
- name: Create Release
id: create_release
Expand All @@ -79,7 +79,7 @@ jobs:
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
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
Expand Down Expand Up @@ -108,30 +108,22 @@ jobs:
# 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: |
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: 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:
Expand Down

0 comments on commit 5ec9dba

Please sign in to comment.