feat: add goreleaser config for cross-platform releases
Some checks failed
continuous-integration/drone/push Build encountered an error
Some checks failed
continuous-integration/drone/push Build encountered an error
Set up GoReleaser with Rust builder (cargo-zigbuild) targeting linux/darwin x amd64/arm64, Gitea release publishing, and Homebrew cask generation. Add mise tasks for test, release, and snapshot builds.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
target/
|
||||
.cuddle/
|
||||
.DS_Store
|
||||
dist/
|
||||
|
||||
62
.goreleaser.yaml
Normal file
62
.goreleaser.yaml
Normal file
@@ -0,0 +1,62 @@
|
||||
version: 2
|
||||
|
||||
before:
|
||||
hooks:
|
||||
- cargo install --locked cargo-zigbuild
|
||||
|
||||
builds:
|
||||
- id: gitnow
|
||||
builder: rust
|
||||
binary: gitnow
|
||||
dir: .
|
||||
targets:
|
||||
- x86_64-unknown-linux-gnu
|
||||
- x86_64-apple-darwin
|
||||
- aarch64-unknown-linux-gnu
|
||||
- aarch64-apple-darwin
|
||||
flags:
|
||||
- --release
|
||||
- -p=gitnow
|
||||
- --features=vendored-openssl
|
||||
|
||||
archives:
|
||||
- id: gitnow
|
||||
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
|
||||
|
||||
checksum:
|
||||
name_template: "checksums.txt"
|
||||
|
||||
changelog:
|
||||
sort: asc
|
||||
filters:
|
||||
exclude:
|
||||
- "^docs:"
|
||||
- "^test:"
|
||||
- "^ci:"
|
||||
|
||||
gitea_urls:
|
||||
api: https://git.kjuulh.io/api/v1
|
||||
download: https://git.kjuulh.io
|
||||
skip_tls_verify: false
|
||||
|
||||
release:
|
||||
gitea:
|
||||
owner: kjuulh
|
||||
name: gitnow
|
||||
draft: false
|
||||
prerelease: auto
|
||||
name_template: "v{{ .Version }}"
|
||||
mode: keep-existing
|
||||
|
||||
homebrew_casks:
|
||||
- name: gitnow
|
||||
binaries:
|
||||
- gitnow
|
||||
repository:
|
||||
owner: kjuulh
|
||||
name: homebrew-tap
|
||||
token: "{{ .Env.GITEA_TOKEN }}"
|
||||
url:
|
||||
template: "https://git.kjuulh.io/kjuulh/gitnow/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
|
||||
homepage: "https://gitnow-client.prod.kjuulh.app"
|
||||
description: "Git Now is a utility for easily navigating git projects from common upstream providers."
|
||||
11
Cargo.lock
generated
11
Cargo.lock
generated
@@ -779,6 +779,7 @@ dependencies = [
|
||||
"minijinja",
|
||||
"nucleo-matcher",
|
||||
"octocrab",
|
||||
"openssl",
|
||||
"pretty_assertions",
|
||||
"prost",
|
||||
"prost-types",
|
||||
@@ -1592,6 +1593,15 @@ version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe"
|
||||
|
||||
[[package]]
|
||||
name = "openssl-src"
|
||||
version = "300.5.0+3.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e8ce546f549326b0e6052b649198487d91320875da901e7bd11a06d1ee3f9c2f"
|
||||
dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "openssl-sys"
|
||||
version = "0.9.111"
|
||||
@@ -1600,6 +1610,7 @@ checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
"openssl-src",
|
||||
"pkg-config",
|
||||
"vcpkg",
|
||||
]
|
||||
|
||||
@@ -39,9 +39,11 @@ termwiz = "0.23.0"
|
||||
regex = "1.11.1"
|
||||
minijinja = "2"
|
||||
shell-words = "1"
|
||||
openssl = { version = "0.10", features = ["vendored"], optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
pretty_assertions = "1.4.0"
|
||||
|
||||
[features]
|
||||
example = []
|
||||
vendored-openssl = ["openssl/vendored"]
|
||||
|
||||
15
mise.toml
15
mise.toml
@@ -1,6 +1,21 @@
|
||||
[tools]
|
||||
rust = "1.93"
|
||||
cargo = "latest"
|
||||
goreleaser = "latest"
|
||||
zig = "latest"
|
||||
"cargo:cargo-zigbuild" = "latest"
|
||||
|
||||
[tasks.install]
|
||||
run = "cargo install --path ./crates/gitnow"
|
||||
|
||||
[tasks.test]
|
||||
run = "cargo test --workspace"
|
||||
description = "Run all workspace tests"
|
||||
|
||||
[tasks.release]
|
||||
run = "goreleaser release --clean"
|
||||
description = "Create a release using GoReleaser (requires GITEA_TOKEN and a git tag)"
|
||||
|
||||
[tasks.release-snapshot]
|
||||
run = "goreleaser release --snapshot --clean"
|
||||
description = "Build a local snapshot release without publishing"
|
||||
|
||||
Reference in New Issue
Block a user