Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update releaser configs #311

Merged
merged 2 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Contains all the PRs that improved the code without changing the behaviors.

## Changed
- Updated sentinel to handle provider events
- moved testnet and mainnet releaser separately

## Fixed
- Fixed code lint
Expand Down
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ release-dry-run-cross:
-v `pwd`/sysroot:/sysroot \
-w /go/src/$(PACKAGE_NAME) \
ghcr.io/goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \
-f releaser/.goreleaser-cross.yaml \
-f releaser/.goreleaser-arkeo-cross.yaml \
--clean --skip=validate --skip=publish

release-dry-run:
Expand All @@ -342,7 +342,7 @@ release-dry-run:
-v `pwd`/sysroot:/sysroot \
-w /go/src/$(PACKAGE_NAME) \
ghcr.io/goreleaser/goreleaser:${GORELEASER_VERSION} \
-f releaser/.goreleaser.yaml \
-f releaser/.goreleaser-arkeo.yaml \
--clean --skip=validate --skip=publish

sentinel-release-dry-run-cross:
Expand Down Expand Up @@ -427,7 +427,7 @@ release:
-v `pwd`/sysroot:/sysroot \
-w /go/src/$(PACKAGE_NAME) \
ghcr.io/goreleaser/goreleaser:${GORELEASER_VERSION} \
-f releaser/.goreleaser.yaml \
-f releaser/.goreleaser-arkeo.yaml \
--clean \
--skip-validate=$(GORELEASER_SKIP_VALIDATE) \
--skip-publish=$(GORELEASER_SKIP_PUBLISH)
Expand All @@ -444,7 +444,7 @@ release-cross:
-v `pwd`/sysroot:/sysroot \
-w /go/src/$(PACKAGE_NAME) \
ghcr.io/goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \
-f releaser/.goreleaser-cross.yaml \
-f releaser/.goreleaser-arkeo-cross.yaml \
--clean \
--skip-validate=$(GORELEASER_SKIP_VALIDATE) \
--skip-publish=$(GORELEASER_SKIP_PUBLISH)
Expand Down Expand Up @@ -537,7 +537,7 @@ release-testnet:
-v `pwd`/sysroot:/sysroot \
-w /go/src/$(PACKAGE_NAME) \
ghcr.io/goreleaser/goreleaser:${GORELEASER_VERSION} \
-f releaser/.goreleaser.yaml \
-f releaser/.goreleaser-arkeo-testnet.yaml \
--clean \
--skip-validate=$(GORELEASER_SKIP_VALIDATE) \
--skip-publish=$(GORELEASER_SKIP_PUBLISH)
Expand All @@ -554,7 +554,7 @@ release-testnet-cross:
-v `pwd`/sysroot:/sysroot \
-w /go/src/$(PACKAGE_NAME) \
ghcr.io/goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \
-f releaser/.goreleaser-cross.yaml \
-f releaser/.goreleaser-arkeo-cross-testnet.yaml \
--clean \
--skip-validate=$(GORELEASER_SKIP_VALIDATE) \
--skip-publish=$(GORELEASER_SKIP_PUBLISH)
Expand All @@ -573,7 +573,7 @@ sentinel-testnet-cross:
-v `pwd`/sysroot:/sysroot \
-w /go/src/$(PACKAGE_NAME) \
ghcr.io/goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \
-f releaser/.goreleaser-sentinel-cross.yaml \
-f releaser/.goreleaser-sentinel-cross-testnet.yaml \
--clean \
--skip-validate=$(GORELEASER_SKIP_VALIDATE) \
--skip-publish=$(GORELEASER_SKIP_PUBLISH)
Expand All @@ -591,7 +591,7 @@ sentinel-testnet-release:
-v `pwd`/sysroot:/sysroot \
-w /go/src/$(PACKAGE_NAME) \
ghcr.io/goreleaser/goreleaser:${GORELEASER_VERSION} \
-f releaser/.goreleaser-sentinel.yaml \
-f releaser/.goreleaser-sentinel-testnet.yaml \
--clean \
--skip-validate=$(GORELEASER_SKIP_VALIDATE) \
--skip-publish=$(GORELEASER_SKIP_PUBLISH)
Expand All @@ -608,7 +608,7 @@ directory-testnet-cross:
-v `pwd`/sysroot:/sysroot \
-w /go/src/$(PACKAGE_NAME) \
ghcr.io/goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \
-f releaser/.goreleaser-directory-cross.yaml \
-f releaser/.goreleaser-directory-cross-testnet.yaml \
--clean \
--skip-validate=$(GORELEASER_SKIP_VALIDATE) \
--skip-publish=$(GORELEASER_SKIP_PUBLISH)
Expand All @@ -625,7 +625,7 @@ directory-testnet:
-v `pwd`/sysroot:/sysroot \
-w /go/src/$(PACKAGE_NAME) \
ghcr.io/goreleaser/goreleaser:${GORELEASER_VERSION} \
-f releaser/.goreleaser-directory.yaml \
-f releaser/.goreleaser-directory-testnet.yaml \
--clean \
--skip-validate=$(GORELEASER_SKIP_VALIDATE) \
--skip-publish=$(GORELEASER_SKIP_PUBLISH)
162 changes: 162 additions & 0 deletions releaser/.goreleaser-arkeo-cross-testnet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
before:
hooks:
- go mod tidy

env:
- CGO_ENABLED=1

builds:
- id: arkeod-testnet-darwin-amd64
binary: arkeod-testnet
env:
- CC=o64-clang
- CGO_LDFLAGS=-L/lib
main: ./cmd/arkeod
goos:
- darwin
goarch:
- amd64
flags:
- -mod=readonly
- -trimpath
ldflags:
- -X main.commit={{.Commit}}
- -X main.date={{ .CommitDate }}
- -X github.com/cosmos/cosmos-sdk/version.Name=Arkeo
- -X github.com/cosmos/cosmos-sdk/version.AppName=arkeo
- -X github.com/cosmos/cosmos-sdk/version.Version=v{{ .Version }}
- -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }}
- -X github.com/cosmos/cosmos-sdk/version.BuildTags=testnet
- -X github.com/arkeonetwork/arkeo/x/arkeo/configs.Version=v{{ .Version }}
- -X github.com/arkeonetwork/arkeo/x/arkeo/configs.GitCommit={{ .Commit }}
- -w -s
- -linkmode=external
tags:
- 'testnet'

- id: arkeod-testnet-darwin-arm64
binary: arkeod-testnet
env:
- CC=o64-clang
- CGO_LDFLAGS=-L/lib
main: ./cmd/arkeod
goos:
- darwin
goarch:
- arm64
flags:
- -mod=readonly
- -trimpath
ldflags:
- -X main.commit={{.Commit}}
- -X main.date={{ .CommitDate }}
- -X github.com/cosmos/cosmos-sdk/version.Name=Arkeo
- -X github.com/cosmos/cosmos-sdk/version.AppName=arkeo
- -X github.com/cosmos/cosmos-sdk/version.Version=v{{ .Version }}
- -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }}
- -X github.com/cosmos/cosmos-sdk/version.BuildTags=testnet
- -X github.com/arkeonetwork/arkeo/x/arkeo/configs.Version=v{{ .Version }}
- -X github.com/arkeonetwork/arkeo/x/arkeo/configs.GitCommit={{ .Commit }}
- -w -s
- -linkmode=external
tags:
- 'testnet'

- id: arkeod-testnet-linux-arm64
binary: arkeod-testnet
env:
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
main: ./cmd/arkeod
goos:
- linux
goarch:
- arm64
ldflags:
- -s -w
- -X main.commit={{.Commit}}
- -X main.date={{ .CommitDate }}
- -X github.com/cosmos/cosmos-sdk/version.Name=Arkeo
- -X github.com/cosmos/cosmos-sdk/version.AppName=arkeo
- -X github.com/cosmos/cosmos-sdk/version.BuildTags=testnet
- -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }}
- -X github.com/arkeonetwork/arkeo/x/arkeo/configs.Version=v{{ .Version }}
- -X github.com/arkeonetwork/arkeo/x/arkeo/configs.GitCommit={{ .Commit }}
- -linkmode=external
- -extldflags '-Wl,-z,muldefs --static -lm'
tags:
- 'testnet'

universal_binaries:
- id: arkeod-testnet-darwin-universal
ids:
- arkeod-testnet-darwin-amd64
- arkeod-testnet-darwin-arm64
replace: false
name_template: >-
{{ .ProjectName }}d-testnet_{{ .Version }}_darwin_universal

archives:
- id: archive-versioned
builds:
- arkeod-testnet-linux-arm64
- arkeod-testnet-darwin-amd64
- arkeod-testnet-darwin-arm64
- arkeod-testnet-darwin-universal
name_template: >-
{{ .ProjectName }}d-testnet_{{ .Version }}_{{ .Os }}_{{ .Arch }}
wrap_in_directory: false
format: zip
files:
- none*

- id: archive-binary
builds:
- arkeod-testnet-linux-arm64
- arkeod-testnet-darwin-amd64
- arkeod-testnet-darwin-arm64
- arkeod-testnet-darwin-universal
name_template: >-
{{ .ProjectName }}d-testnet_{{ .Os }}_{{ .Arch }}
wrap_in_directory: false
format: binary
files:
- none*

checksum:
name_template: >-
{{ .ProjectName }}d-testnet_{{ .Version }}_checksums.txt

dockers:
- use: buildx
goos: linux
goarch: arm64
dockerfile: docker/Dockerfile
image_templates:
- 'ghcr.io/arkeonetwork/{{ .ProjectName }}-testnet:latest-arm64'
- 'ghcr.io/arkeonetwork/{{ .ProjectName }}-testnet:{{ .Version }}-arm64'
build_flag_templates:
- "--pull"
- "--platform=linux/arm64"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title=arkeod-testnet"
- "--label=org.opencontainers.image.description=Arkeo Daemon Testnet"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.url=https://arkeo.network/"
- "--label=org.opencontainers.image.source=https://github.com/arkeonetwork/arkeo"
- "--label=org.opencontainers.image.licenses=Apache-2.0"

docker_manifests:
- name_template: 'ghcr.io/arkeonetwork/{{ .ProjectName }}-testnet:latest'
image_templates:
- 'ghcr.io/arkeonetwork/{{ .ProjectName }}-testnet:latest-amd64'
- 'ghcr.io/arkeonetwork/{{ .ProjectName }}-testnet:latest-arm64'

- name_template: 'ghcr.io/arkeonetwork/{{ .ProjectName }}-testnet:{{ .Version }}'
image_templates:
- 'ghcr.io/arkeonetwork/{{ .ProjectName }}-testnet:{{ .Version }}-amd64'
- 'ghcr.io/arkeonetwork/{{ .ProjectName }}-testnet:{{ .Version }}-arm64'

release:
skip_upload: '{{ if eq .Env.RELEASE "true" }}false{{else}}true{{end}}'
Loading
Loading