diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..de83094 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: goreleaser + +on: + push: + tags: + - "*" + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - run: git fetch --force --tags + - uses: actions/setup-go@v4 + with: + go-version: stable + - uses: goreleaser/goreleaser-action@v5 + with: + distribution: goreleaser + version: ${{ env.GITHUB_REF_NAME }} + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.PUBLISHER_TOKEN }} diff --git a/.gitignore b/.gitignore index 5b27170..536a6e9 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ ggml-medium.bin whisper-api-server.exe tmp/* -!tmp/.gitkeep \ No newline at end of file +!tmp/.gitkeep +dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..4377560 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,14 @@ +builds: + - binary: whisper-api-server + goos: + - windows + goarch: + - amd64 + env: + - CGO_ENABLED=1 + +release: + prerelease: auto + +checksum: + name_template: "checksum.txt" diff --git a/README.md b/README.md index cf7fffc..84e922e 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Receive a response in JSON format: - [x] Implement automatic model downloading from [huggingface](https://huggingface.co/ggerganov/whisper.cpp/tree/main) - [x] Implement automatic `Whisper.dll` downloading from [Guthub releases](https://github.com/Const-me/Whisper/releases) -- [ ] Provide prebuilt binaries for Windows +- [x] Provide prebuilt binaries for Windows - [ ] Include instructions for running on Linux with Wine (likely possible). # Credits