ICS Consumer Linux PSS Build #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ICS Consumer Linux PSS Build | |
on: | |
workflow_dispatch: | |
# push: | |
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.21.8.linux-amd64.tar.gz | |
sudo tar -C /usr/local -xzf go1.21.8.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/partial-set-security | |
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: consumer-pss | |
bodyFile: .github/workflows/ics-consumer-linux-pss-body.md | |
prerelease: true | |
replacesArtifacts: false | |
allowUpdates: false | |
tag: "ics-consumer-pss" | |
token: ${{ secrets.GITHUB_TOKEN }} |