Skip to content

Commit

Permalink
Adding Windows support
Browse files Browse the repository at this point in the history
  • Loading branch information
frievoe97 committed Aug 27, 2024
1 parent 116211a commit d74e89b
Showing 1 changed file with 13 additions and 23 deletions.
36 changes: 13 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ jobs:
build-macos:
runs-on: macos-latest

outputs:
release_url: ${{ steps.create_release.outputs.upload_url }}

steps:
- name: Checkout Repository
uses: actions/checkout@v2
Expand All @@ -35,26 +32,12 @@ jobs:
cd dist
zip -r Mastermind-mac.zip Mastermind.app
- name: Create Release (macOS)
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload macOS Build Artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
id: upload_macos
uses: actions/upload-artifact@v3
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/Mastermind-mac.zip
asset_name: Mastermind-mac.zip
asset_content_type: application/zip
name: Mastermind-mac
path: dist/Mastermind-mac.zip

build-windows:
runs-on: windows-latest
Expand Down Expand Up @@ -85,6 +68,13 @@ jobs:
cd dist
powershell Compress-Archive -Path Mastermind -DestinationPath Mastermind-win.zip
- name: Upload Windows Build Artifact
id: upload_windows
uses: actions/upload-artifact@v3
with:
name: Mastermind-win
path: dist/Mastermind-win.zip

create-release:
runs-on: ubuntu-latest
needs: [build-macos, build-windows]
Expand All @@ -110,7 +100,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/Mastermind-mac.zip
asset_path: ${{ github.workspace }}/dist/Mastermind-mac.zip
asset_name: Mastermind-mac.zip
asset_content_type: application/zip

Expand All @@ -120,6 +110,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/Mastermind-win.zip
asset_path: ${{ github.workspace }}/dist/Mastermind-win.zip
asset_name: Mastermind-win.zip
asset_content_type: application/zip

0 comments on commit d74e89b

Please sign in to comment.