-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
151 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# See documentation at https://goreleaser.com/customization/build. | ||
project_name: czip | ||
|
||
builds: | ||
- id: czip-compressor | ||
main: ./cmd/czip-compressor | ||
binary: czip-compressor | ||
goos: | ||
- darwin | ||
- linux | ||
- windows | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
ldflags: | ||
- -s -w -X github.com/0xsequence/czip/compressor.VERSION=v{{.Version}} | ||
|
||
archives: | ||
- id: czip-compressor | ||
builds: | ||
- czip-compressor | ||
name_template: "{{ .Binary }}.{{ .Os }}-{{ .Arch }}" | ||
format: binary | ||
|
||
checksum: | ||
name_template: "checksums.txt" | ||
|
||
release: | ||
footer: | | ||
## Docker | ||
``` | ||
$ docker pull ghcr.io/0xsequence/czip-compressor:v{{.Version}} | ||
``` | ||
Example: `$ docker run ghcr.io/0xsequence/czip-compressor` | ||
## Homebrew | ||
``` | ||
$ brew tap 0xsequence/tap | ||
$ brew install czip-compressor | ||
$ czip-compressor | ||
``` | ||
## Build from source | ||
``` | ||
$ go install github.com/0xsequence/czip/cmd/czip-compressor | ||
``` | ||
## Download binaries | ||
macOS: [amd64](https://github.com/0xsequence/czip/releases/download/v{{.Version}}/czip-compressor.darwin-amd64), [arm64](https://github.com/0xsequence/czip/releases/download/v{{.Version}}/czip-compressor.darwin-arm64) (Apple Silicon) | ||
Linux: [amd64](https://github.com/0xsequence/czip/releases/download/v{{.Version}}/czip-compressor.linux-amd64), [arm64](https://github.com/0xsequence/czip/releases/download/v{{.Version}}/czip-compressor.linux-arm64) | ||
Windows: [amd64](https://github.com/0xsequence/czip/releases/download/v{{.Version}}/czip-compressor.windows-amd64.exe), [arm64](https://github.com/0xsequence/czip/releases/download/v{{.Version}}/czip-compressor.windows-arm64.exe) | ||
changelog: | ||
use: github | ||
sort: asc | ||
|
||
brews: | ||
- name: czip-compressor | ||
ids: | ||
- czip-compressor | ||
tap: | ||
owner: 0xsequence | ||
name: homebrew-tap | ||
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" | ||
commit_author: | ||
name: goreleaserbot | ||
email: [email protected] | ||
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}" | ||
homepage: "https://github.com/0xsequence/czip" | ||
description: "czip: EVM Calldata Zip" | ||
license: "MIT" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Release tag | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.22 | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v3 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release -f .github/workflows/.goreleaser.yml --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} | ||
|
||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Log into Github registry | ||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | ||
- name: Docker build | ||
run: | | ||
docker build --build-arg VERSION=${GITHUB_REF##*/} -t ghcr.io/0xsequence/czip-compressor:${GITHUB_REF##*/} -t ghcr.io/0xsequence/czip-compressor:latest . | ||
docker push ghcr.io/0xsequence/czip-compressor:${GITHUB_REF##*/} | ||
docker push ghcr.io/0xsequence/czip-compressor:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# ----------------------------------------------------------------- | ||
# Builder | ||
# ----------------------------------------------------------------- | ||
FROM golang:1.22.0-alpine3.19 as builder | ||
ARG VERSION | ||
|
||
RUN apk add --update git | ||
|
||
ADD ./ /src | ||
|
||
WORKDIR /src | ||
RUN go build -ldflags="-s -w -X github.com/0xsequence/czip/compressor.VERSION=${VERSION}" -o /usr/bin/czip-compressor ./cmd/czip-compressor | ||
|
||
# ----------------------------------------------------------------- | ||
# Runner | ||
# ----------------------------------------------------------------- | ||
FROM alpine:3.19 | ||
|
||
ENV TZ=UTC | ||
|
||
RUN apk add --no-cache --update ca-certificates | ||
|
||
COPY --from=builder /usr/bin/czip-compressor /usr/bin/ | ||
|
||
ENTRYPOINT ["/usr/bin/czip-compressor"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package compressor | ||
|
||
var VERSION = "dev" |