Skip to content

[Docs] Node/Relayminer/AppgateServer deployment guide #2

[Docs] Node/Relayminer/AppgateServer deployment guide

[Docs] Node/Relayminer/AppgateServer deployment guide #2

name: Release artifacts
on:
push:
branches: ["main"]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
jobs:
release-artifacts:
runs-on: ubuntu-latest
steps:
- name: install ignite
# TODO_TECHDEBT: upgrade to the latest Ignite (the latest at the moment of creating a note is 0.28). Need to downgrade to fix CI pipelines. Might be done in scope of #240.
run: |
# curl https://get.ignite.com/cli! | bash
wget https://github.com/ignite/cli/releases/download/v28.2.0/ignite_28.2.0_linux_amd64.tar.gz
tar -xzf ignite_28.2.0_linux_amd64.tar.gz
sudo mv ignite /usr/local/bin/ignite
ignite version
- uses: actions/checkout@v3
with:
fetch-depth: "0" # Per https://github.com/ignite/cli/issues/1674#issuecomment-1144619147
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21.6"
- name: Install CI dependencies
run: make install_ci_deps
- name: Generate protobufs
run: make proto_regen
- name: Generate mocks
run: make go_mockgen
- name: Build binaries
run: ignite chain build --release -t=linux:amd64 -t=linux:arm64 -t=windows:amd64 -t=windows:arm64 -t=darwin:arm64 -t=darwin:amd64 --debug
- name: Unarchive linux binaries for Docker to consume
run: |
mkdir -p release_linux_amd64 && tar -zxvf release/poktroll_linux_amd64.tar.gz -C $_
mkdir -p release_linux_arm64 && tar -zxvf release/poktroll_linux_arm64.tar.gz -C $_
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# TODO(@okdas): switch to this method of building production images, as this is a quick way to build multi-arch
# images, reusing binaries pre-built by Ignite.
# - 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=ref,event=tag
# type=sha
# type=sha,format=long
# - 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
# cache-from: type=gha
# cache-to: type=gha,mode=max
# context: .
# TODO(@okdas): when we have proper releases, we can remove this and use binaries built by releases instead.
# But for now, attach them to commits so we/community can access them
# - name: Add binaries to commit
# uses: actions/upload-artifact@v4
# with:
# name: poktrolld
# path: release/*
# TODO(@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/*