Skip to content

ICS Provider Linux Preview Build #68

ICS Provider Linux Preview Build

ICS Provider Linux Preview Build #68

name: ICS Provider Linux Preview Build
on:
workflow_dispatch:
schedule:
- cron: '0 6 * * 1-5'
jobs:
build:
name: Build
runs-on: ubuntu-latest
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 feat/ics-misbehaviour-handling
export LDFLAGS="-extldflags=-static"
export CGO_ENABLED=0
make install
cp ~/go/bin/interchain-security-pd ~/interchain-security-pd-linux
# Publish
- name: Remove old release
uses: dev-drprasad/[email protected]
with:
keep_latest: 0
delete_tag_pattern: "ics-provider-preview"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Add release
uses: ncipollo/release-action@v1
with:
artifacts: "~/interchain-security-pd-linux"
name: provider-preview
bodyFile: .github/workflows/ics-provider-linux-preview-body.md
prerelease: true
replacesArtifacts: false
allowUpdates: false
tag: "ics-provider-preview"
token: ${{ secrets.GITHUB_TOKEN }}