Skip to content

Commit

Permalink
fix release pipeline (#4)
Browse files Browse the repository at this point in the history
* fix release pipeline

* added genesis

* dockerfile

* aalborgHeight

---------

Co-authored-by: Vinayak <[email protected]>
  • Loading branch information
itsksaurabh and vinayak0035 authored Apr 1, 2024
1 parent 99404ed commit 0e1e878
Show file tree
Hide file tree
Showing 8 changed files with 1,343 additions and 61 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/packager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
- 'v*.*.*'
- 'v*.*.*-*'

permissions:
contents: write
packages: write
pull-requests: write

jobs:
build:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -385,8 +390,9 @@ jobs:

- name: Confirming package built
run: ls -ltr packaging/deb/ | grep heimdall

- name: Release heimdalld.deb
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.GIT_TAG }}
prerelease: true
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB }}
password: ${{ secrets.DOCKERHUB_KEY }}
# - name: Login to Docker Hub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKERHUB }}
# password: ${{ secrets.DOCKERHUB_KEY }}

- name: Run GoReleaser
run: make release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.prepare.outputs.tag_name }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
DOCKER_USERNAME: ${{ secrets.DOCKERHUB }}
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_KEY }}
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
# DOCKER_USERNAME: ${{ secrets.DOCKERHUB }}
# DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_KEY }}
100 changes: 53 additions & 47 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@ builds:
- -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}

nfpms:
- vendor: 0xPolygon
homepage: https://polygon.technology
maintainer: Polygon Team <[email protected]>
description: Polygon Blockchain
- vendor: 0xShibarium
homepage: https://shibarium.shib.io/
maintainer: Shibarium Team <[email protected]>
description: Shibarium Blockchain
license: GPLv3 LGPLv3

bindir: /usr/local/bin
Expand All @@ -196,6 +196,12 @@ nfpms:
- src: builder/files/genesis-testnet-v4.json
dst: /etc/heimdall/genesis-testnet-v4.json
type: config
- src: builder/files/genesis-shibarium.json
dst: /etc/heimdall/genesis-shibarium.json
type: config
- src: builder/files/genesis-puppynet.json
dst: /etc/heimdall/genesis-puppynet.json
type: config
- dst: /var/lib/heimdall
type: dir
file_info:
Expand All @@ -207,50 +213,50 @@ nfpms:
snapshot:
name_template: "{{ .Tag }}.next"

dockers:
- image_templates:
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-amd64
dockerfile: Dockerfile.release
use: buildx
goarch: amd64
ids:
- heimdalld-linux-amd64
- heimdallcli-linux-amd64
build_flag_templates:
- --platform=linux/amd64
extra_files:
- docker/entrypoint.sh
- builder/files/genesis-mainnet-v1.json
- builder/files/genesis-testnet-v4.json
# dockers:
# - image_templates:
# - 0xShibarium/{{ .ProjectName }}:{{ .Version }}-amd64
# dockerfile: Dockerfile.release
# use: buildx
# goarch: amd64
# ids:
# - heimdalld-linux-amd64
# - heimdallcli-linux-amd64
# build_flag_templates:
# - --platform=linux/amd64
# extra_files:
# - docker/entrypoint.sh
# - builder/files/genesis-mainnet-v1.json
# - builder/files/genesis-testnet-v4.json

- image_templates:
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-arm64
dockerfile: Dockerfile.release
use: buildx
goarch: arm64
ids:
- heimdalld-linux-arm64
- heimdallcli-linux-arm64
build_flag_templates:
- --platform=linux/arm64/v8
extra_files:
- docker/entrypoint.sh
- builder/files/genesis-mainnet-v1.json
- builder/files/genesis-testnet-v4.json
# - image_templates:
# - 0xShibarium/{{ .ProjectName }}:{{ .Version }}-arm64
# dockerfile: Dockerfile.release
# use: buildx
# goarch: arm64
# ids:
# - heimdalld-linux-arm64
# - heimdallcli-linux-arm64
# build_flag_templates:
# - --platform=linux/arm64/v8
# extra_files:
# - docker/entrypoint.sh
# - builder/files/genesis-mainnet-v1.json
# - builder/files/genesis-testnet-v4.json

docker_manifests:
- name_template: 0xpolygon/{{ .ProjectName }}:{{ .Version }}
image_templates:
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-amd64
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-arm64
# docker_manifests:
# - name_template: 0xShibarium/{{ .ProjectName }}:{{ .Version }}
# image_templates:
# - 0xShibarium/{{ .ProjectName }}:{{ .Version }}-amd64
# - 0xShibarium/{{ .ProjectName }}:{{ .Version }}-arm64

- name_template: 0xpolygon/{{ .ProjectName }}:latest
image_templates:
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-amd64
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-arm64
# - name_template: 0xShibarium/{{ .ProjectName }}:latest
# image_templates:
# - 0xShibarium/{{ .ProjectName }}:{{ .Version }}-amd64
# - 0xShibarium/{{ .ProjectName }}:{{ .Version }}-arm64

announce:
slack:
enabled: true
# The name of the channel that the user selected as a destination for webhook messages.
channel: '#code-releases'
# announce:
# slack:
# enabled: true
# # The name of the channel that the user selected as a destination for webhook messages.
# channel: '#code-releases'
4 changes: 2 additions & 2 deletions Dockerfile.release
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ RUN apk add --no-cache \
WORKDIR ${HEIMDALL_DIR}
COPY heimdalld /usr/bin/
COPY heimdallcli /usr/bin/
COPY builder/files/genesis-mainnet-v1.json ${HEIMDALL_DIR}/
COPY builder/files/genesis-testnet-v4.json ${HEIMDALL_DIR}/
COPY builder/files/genesis-shibarium.json ${HEIMDALL_DIR}/
COPY builder/files/genesis-puppynet.json ${HEIMDALL_DIR}/

COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh

Expand Down
Loading

0 comments on commit 0e1e878

Please sign in to comment.