Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/knadh/zig-releaser
A simple hack to use GoReleaser to build, release, and publish Zig projects.
https://github.com/knadh/zig-releaser
build-release build-tool goreleaser package release release-automation zig zig-package
Last synced: 14 days ago
JSON representation
A simple hack to use GoReleaser to build, release, and publish Zig projects.
- Host: GitHub
- URL: https://github.com/knadh/zig-releaser
- Owner: knadh
- License: mit
- Created: 2021-10-23T16:26:44.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-11-02T04:50:33.000Z (about 1 year ago)
- Last Synced: 2024-11-11T05:38:04.507Z (2 months ago)
- Topics: build-release, build-tool, goreleaser, package, release, release-automation, zig, zig-package
- Language: Shell
- Homepage:
- Size: 5.86 KB
- Stars: 11
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zig-releaser
zig-releaser is a hack that allows Zig programs to be built, packaged, and released with [GoReleaser](https://goreleaser.com), a tool for publishing Go programs.
[Here is an example](https://github.com/knadh/csv2json/releases) 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](https://goreleaser.com/install/).
- Setup the [GitHub token](https://github.com/settings/tokens/new) 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
```sh
goreleaser --snapshot --skip=publish --clean
```The releases will appear in the `dist` directory.
### Publish
```sh
goreleaser --snapshot --skip=publish --clean
```