Go to file
AJ ONeal 42be08ee62
fix: update for goreleaser v1.21.1 and POSIX shell (#1)
2023-11-02 10:20:33 +05:30
.goreleaser fix: update for goreleaser v1.21.1 and POSIX shell (#1) 2023-11-02 10:20:33 +05:30
.goreleaser.yml fix: update for goreleaser v1.21.1 and POSIX shell (#1) 2023-11-02 10:20:33 +05:30
LICENSE First commit. 2021-10-23 21:55:33 +05:30
README.md fix: update for goreleaser v1.21.1 and POSIX shell (#1) 2023-11-02 10:20:33 +05:30

README.md

zig-releaser

zig-releaser is a hack that allows Zig programs to be built, packaged, and released with GoReleaser, a tool for publishing Go programs.

Here is an example for a Zig program published to GitHub with GoReleaser. The changelog and artefacts are all automatically generated by GoReleaser. This hack has only been tested with GitHub but should work with other release targets GoReleaser supports.

How to use

  • Install GoReleaser.

  • Setup the GitHub token with repo perms.

  • Copy .goreleaser/, and .goreleaser.yml from this repo to the root of the Zig project.

  • Edit .goreleaser.yml for the project (generally the binary, goos, files fields).

  • Edit build.sh script to tweak the zig build flags.

Once the project is ready for release, add a semver tag (git tag -a v0.1.0 -m v0.1.0)

Dry run

goreleaser --snapshot --skip=publish --clean

The releases will appear in the dist directory.

Publish

goreleaser --snapshot --skip=publish --clean