Skip to content

ics v4.1.0

ics v4.1.0 #32

name: ICS Consumer Linux Build Release
on:
workflow_dispatch:
push:
jobs:
collect_remote_release:
name: Read latest interchain-security release
runs-on: ubuntu-latest
outputs:
release: ${{ steps.query_release.outputs.release }}
steps:
- name: Query latest release of the interchain-security repo
id: query_release
run: |
latest=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/cosmos/interchain-security/releases | jq -r '.[0].tag_name')
echo "release=$latest" >> "$GITHUB_OUTPUT"
build:
name: Build
runs-on: ubuntu-latest
needs: [collect_remote_release]
permissions:
contents: write
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Install tools
run: |
sudo apt-get install curl jq -y
- name: Setup environment
run: |
sudo apt install build-essential wget -y
- name: Install golang
run: |
wget -q https://go.dev/dl/go1.20.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.20.linux-amd64.tar.gz
- name: Clone and build interchain security
run: |
export PATH=$PATH:/usr/local/go/bin
LAST_RELEASE=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/cosmos/interchain-security/releases | jq -r '.[0].tag_name')
git clone https://github.com/cosmos/interchain-security.git
cd interchain-security
git checkout v4.1.0
export LDFLAGS="-extldflags=-static"
export CGO_ENABLED=0
make install
cp ~/go/bin/interchain-security-cd ~/interchain-security-cd-linux
# Publish
- name: Add release
uses: ncipollo/release-action@v1
with:
artifacts: "~/interchain-security-cd-linux"
name: ics-consumer-v4.1.0
bodyFile: .github/workflows/ics-linux-release-body.md
prerelease: true
replacesArtifacts: false
allowUpdates: false
tag: "ics-consumer-v4.1.0"
token: ${{ secrets.GITHUB_TOKEN }}