diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b033343..43885306 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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*/*