Skip to content

Commit

Permalink
add windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ajayd-san committed Dec 18, 2024
1 parent 95ec042 commit bcc8e17
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
types:
- closed
workflow_dispatch:
push:

jobs:
build-linux:
Expand Down Expand Up @@ -69,10 +70,34 @@ jobs:
name: macos_artifacts
path: gmd_darwin*.tar.gz

build-windows:
if: ${{ github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch' }}
runs-on: windows-2022
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'

- name: Build artifact amd64
run: go build -o gmd_windows_amd64 .

- name: Tar artifact
run: |
tar czf gmd_windows_amd64.tar.gz gmd_windows_amd64
- name: Upload windows assets
uses: actions/upload-artifact@v4
with:
name: windows_artifacts
path: gmd_windows*.tar.gz

create-release:
if: ${{ github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
needs: [build-linux, build-darwin]
needs: [build-linux, build-darwin, build-windows]
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
Expand All @@ -84,3 +109,4 @@ jobs:
files: |
linux_artifacts/*
macos_artifacts/*
windows_artifacts/*

0 comments on commit bcc8e17

Please sign in to comment.