Skip to content

Commit a62b058

Browse files
authored
Add Windows build (#1)
Signed-off-by: Grant Linville <[email protected]>
1 parent 980c5f8 commit a62b058

File tree

1 file changed

+35
-7
lines changed

1 file changed

+35
-7
lines changed

.github/workflows/build.yml

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,40 @@ jobs:
7474
name: gptscript-credential-helpers
7575
path: ${{ env.DESTDIR }}/*
7676
if-no-files-found: error
77-
-
78-
name: GitHub Release
79-
if: startsWith(github.ref, 'refs/tags/v')
80-
uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2.0.5
81-
env:
82-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
78+
windows_build:
79+
runs-on: windows-latest
80+
steps:
81+
- name: Checkout
82+
uses: actions/checkout@v4
83+
with:
84+
fetch-depth: 0
85+
- name: Set up Go
86+
uses: actions/setup-go@v5
87+
with:
88+
go-version: ${{ env.GO_VERSION }}
89+
- name: Build
90+
run: |
91+
make build-wincred
92+
mv ${{ env.DESTDIR }}/gptscript-credential-wincred ${{ env.DESTDIR }}/gptscript-credential-wincred.exe
93+
- name: Upload Windows Artifact
94+
uses: actions/upload-artifact@v4
95+
with:
96+
name: gptscript-credential-helpers-windows
97+
path: ${{ env.DESTDIR }}/*wincred*
98+
if-no-files-found: error
99+
100+
create_release:
101+
runs-on: ubuntu-latest
102+
needs: [ build, windows_build ]
103+
if: startsWith(github.ref, 'refs/tags/v')
104+
steps:
105+
- run: sleep 10
106+
- name: Download all artifacts
107+
uses: actions/download-artifact@v4
108+
- run: ls -lR
109+
- name: Create Release
110+
uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87
83111
with:
84112
draft: true
85-
files: ${{ env.DESTDIR }}/*
113+
files: gptscript-credential-helpers*/*

0 commit comments

Comments
 (0)