Skip to content

chore: Enrich log

chore: Enrich log #22

name: Release artifacts
on:
push:
tags:
- "v*.*.*"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
jobs:
release-artifacts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: "0" # Per https://github.com/ignite/cli/issues/1674#issuecomment-1144619147
- name: install ignite
run: |
make ignite_install
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.23.0"
- name: Install CI dependencies
run: make install_ci_deps
# This is commented out because proto generated code is now tracked in the
# repo so this step is skipped.
# TODO_IMPROVE(@okdas): Have a step that regenerates the proto files and ensures
# if they are up to date. See https://github.com/pokt-network/poktroll/pull/544#issuecomment-2123063491
# - name: Generate protobufs
# run: make proto_regen
- name: Build and extract binaries for container build
run: |
make ignite_update_ldflags
make ignite_release
make ignite_release_extract_binaries
make cosmovisor_cross_compile
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker Metadata action
id: meta
uses: docker/metadata-action@v5
env:
DOCKER_METADATA_PR_HEAD_SHA: "true"
with:
images: |
ghcr.io/pokt-network/poktrolld
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=ref,event=tag,suffix=-prod
type=sha,suffix=-prod
type=sha,format=long,suffix=-prod
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
file: Dockerfile.release
cache-from: type=gha
cache-to: type=gha,mode=max
context: .
# TODO_TECHDEBT(@okdas): use for releases (also change the "on" part at the top so it only tgirrered for tags/releases)
- name: Add release and publish binaries
uses: softprops/action-gh-release@v1
with:
files: |
release/*