Skip to content

Commit

Permalink
release arm
Browse files Browse the repository at this point in the history
  • Loading branch information
anhductn2001 committed Apr 16, 2024
1 parent b24d4f0 commit c0dae6a
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 41 deletions.
75 changes: 34 additions & 41 deletions .github/workflows/release_binary.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,38 @@
---
name: Release Binary
name: Release Binary

on:
release:
types: [created]
on:
release:
types: [created]

permissions:
contents: read
packages: write
permissions:
contents: read
packages: write

jobs:
release:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Docker compose
run: docker-compose up -d

- name: Copy binary
run: docker cp dymension_node_1:/usr/local/bin/dymd ./dymd

- name: Save sha256 sum
run: sha256sum ./dymd > ./dymd_sha256.txt

- name: Release
uses: softprops/action-gh-release@v1
with:
token: ${{ github.token }}
files: |
dymd
dymd_sha256.txt
- name: Dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v2
# This workflow creates a release using goreleaser
# via the 'make release' command.

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git fetch --force --tags

- uses: actions/setup-go@v5
with:
go-version: "1.21"

- name: Set Env
run: echo "TM_VERSION=$(go list -m github.com/tendermint/tendermint | sed 's:.* ::')" >> $GITHUB_ENV

- name: Release
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53 changes: 53 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@

---
project_name: dymension

env:
- GO111MODULE=on

builds:
- main: ./cmd/gaiad
id: "gaiad"
binary: gaiad
mod_timestamp: "{{ .CommitTimestamp }}"
flags:
- -tags=netgo ledger
- -trimpath
env:
- CGO_ENABLED=0
ldflags:
- -s -w -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} -X github.com/cosmos/cosmos-sdk/version.Name=dymension -X github.com/cosmos/cosmos-sdk/version.AppName=dymd -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=netgo,ledger -X github.com/tendermint/tendermint/version.TMCoreSemVer={{ .Env.TM_VERSION }}
goos:
- darwin
- linux
- windows
goarch:
- amd64
- arm64

archives:
# disables archiving; to enable use commented lines below
- format: binary
name_template: "{{ .Binary }}-v{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"

release:
prerelease: true
name_template: "v{{.Version}}"

checksum:
name_template: SHA256SUMS-v{{.Version}}.txt
algorithm: sha256

snapshot:
name_template: SNAPSHOT-{{ .Commit }}

changelog:
skip: false

git:
# What should be used to sort tags when gathering the current and previous
# tags if there are more than one tag in the same commit.
#
# source: https://goreleaser.com/customization/git/
tag_sort: -version:refname
prerelease_suffix: "-rc"

0 comments on commit c0dae6a

Please sign in to comment.