Skip to content

Commit

Permalink
Add Windows build
Browse files Browse the repository at this point in the history
Signed-off-by: Grant Linville <[email protected]>
  • Loading branch information
g-linville committed Aug 12, 2024
1 parent 980c5f8 commit fe3fc8a
Showing 1 changed file with 35 additions and 7 deletions.
42 changes: 35 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,40 @@ jobs:
name: gptscript-credential-helpers
path: ${{ env.DESTDIR }}/*
if-no-files-found: error
-
name: GitHub Release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2.0.5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

windows_build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Build
run: |
make build-wincred
mv ${{ env.DESTDIR }}/gptscript-credential-wincred ${{ env.DESTDIR }}/gptscript-credential-wincred.exe
- name: Upload Windows Artifact
uses: actions/upload-artifact@v4
with:
name: gptscript-credential-helpers-windows
path: ${{ env.DESTDIR }}/*wincred*
if-no-files-found: error

create_release:
runs-on: ubuntu-latest
needs: [ build, windows_build ]
if: startsWith(github.ref, 'refs/tags/v')
steps:
- run: sleep 10
- name: Download all artifacts
uses: actions/download-artifact@v4
- run: ls -lR
- name: Create Release
uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87
with:
draft: true
files: ${{ env.DESTDIR }}/*
files: gptscript-credential-helpers*/*

0 comments on commit fe3fc8a

Please sign in to comment.