Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
ci: fix release workflow (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiendan authored and atanmarko committed Sep 7, 2023
1 parent c58b6c9 commit 53ee2ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 49 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
name: Release
on: # yamllint disable-line rule:truthy
on: # yamllint disable-line rule:truthy
push:
branches-ignore:
- '**'
- "**"
tags:
- 'v*.*.*'
- "v*.*.*"
# to be used by fork patch-releases ^^
- 'v*.*.*-*'
- "v*.*.*-*"

jobs:
goreleaser:
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
ghcr.io/goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \
--rm-dist --skip-validate
env:
PACKAGE_NAME: github.com/0xPolygon/polygon-edge
PACKAGE_NAME: github.com/topos-protocol/polygon-edge
GOLANG_CROSS_VERSION: v1.20.5
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.prepare.outputs.tag_name }}
Expand Down
49 changes: 5 additions & 44 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ builds:
env:
- CC=o64-clang
- CXX=o64-clang++
ldflags:
-s -w -X 'github.com/0xPolygon/polygon-edge/versioning.Version=v{{ .Version }}'
ldflags: -s -w -X 'github.com/topos-network/polygon-edge/versioning.Version=v{{ .Version }}'

- id: darwin-arm64
main: ./main.go
Expand All @@ -29,8 +28,7 @@ builds:
env:
- CC=oa64-clang
- CXX=oa64-clang++
ldflags:
-s -w -X 'github.com/0xPolygon/polygon-edge/versioning.Version=v{{ .Version }}'
ldflags: -s -w -X 'github.com/topos-network/polygon-edge/versioning.Version=v{{ .Version }}'

- id: linux-amd64
main: ./main.go
Expand All @@ -44,7 +42,7 @@ builds:
- CXX=g++
ldflags:
# We need to build a static binary because we are building in a glibc based system and running in a musl container
-s -w -linkmode external -extldflags "-static" -X 'github.com/0xPolygon/polygon-edge/versioning.Version=v{{ .Version }}'
-s -w -linkmode external -extldflags "-static" -X 'github.com/topos-network/polygon-edge/versioning.Version=v{{ .Version }}'
tags:
- netgo
- osusergo
Expand All @@ -61,14 +59,13 @@ builds:
- CXX=aarch64-linux-gnu-g++
ldflags:
# We need to build a static binary because we are building in a glibc based system and running in a musl container
-s -w -linkmode external -extldflags "-static" -X 'github.com/0xPolygon/polygon-edge/versioning.Version=v{{ .Version }}'
-s -w -linkmode external -extldflags "-static" -X 'github.com/topos-network/polygon-edge/versioning.Version=v{{ .Version }}'
tags:
- netgo
- osusergo

archives:
-
files:
- files:
- LICENSE
- README.md

Expand Down Expand Up @@ -96,39 +93,3 @@ archives:

snapshot:
name_template: "{{ .Tag }}.next"

dockers:
- image_templates:
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-amd64
dockerfile: Dockerfile.release
use: buildx
goarch: amd64
ids:
- linux-amd64
build_flag_templates:
- --platform=linux/amd64
skip_push: false

- image_templates:
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-arm64
dockerfile: Dockerfile.release
use: buildx
goarch: arm64
ids:
- linux-arm64
build_flag_templates:
- --platform=linux/arm64
skip_push: false

docker_manifests:
- name_template: 0xpolygon/{{ .ProjectName }}:{{ .Version }}
image_templates:
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-amd64
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-arm64
skip_push: false

- name_template: 0xpolygon/{{ .ProjectName }}:latest
image_templates:
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-amd64
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-arm64
skip_push: auto

0 comments on commit 53ee2ad

Please sign in to comment.