Skip to content

Namada 0.23.0

Namada 0.23.0 #44

Workflow file for this run

name: Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-[a-z]+"
permissions:
id-token: write
contents: write
env:
GIT_LFS_SKIP_SMUDGE: 1
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-latest]
namada_cache_version: [v1]
make:
- name: Build package
command: package
env:
RUST_BACKTRACE: full
RUSTC_WRAPPER: sccache
SCCACHE_CACHE_SIZE: 100G
SCCACHE_BUCKET: namada-sccache-master
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git fetch --tags --force origin # WA: https://github.com/actions/checkout/issues/882
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::375643557360:role/anoma-github-action-ci-master
aws-region: eu-west-1
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install sccache (ubuntu-20.04)
if: matrix.os == 'ubuntu-20.04'
env:
LINK: https://github.com/mozilla/sccache/releases/download
SCCACHE_VERSION: v0.5.4
run: |
SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl
mkdir -p $HOME/.local/bin
curl -L "$LINK/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz
mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache
chmod +x $HOME/.local/bin/sccache
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install sccache (macos-latest)
if: matrix.os == 'macos-latest'
run: |
brew update
brew install sccache
- name: Setup rust toolchain
uses: oxidecomputer/actions-rs_toolchain@ad3f86084a8a5acf2c09cb691421b31cf8af7a36
with:
profile: minimal
override: true
- name: Cache cargo registry
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-namada-release-${{ matrix.namada_cache_version }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-namada-release-${{ matrix.namada_cache_version }}
- name: Start sccache server
run: sccache --start-server
- name: Install cargo-about
run: |
cargo install --version 0.5.2 cargo-about
- name: ${{ matrix.make.name }}
run: make ${{ matrix.make.command }}
- name: Upload binaries package
uses: actions/upload-artifact@v3
with:
name: release-${{ matrix.os }}-${{ github.sha }}
path: ./*.tar.gz
- name: Print sccache stats
if: always()
run: sccache --show-stats
- name: Stop sccache server
if: always()
run: sccache --stop-server || true
release:
needs: build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
steps:
- id: get_version
uses: battila7/get-version-action@v2
- name: Download release artifacts
uses: actions/download-artifact@v3
- name: Create release
uses: softprops/action-gh-release@v1
with:
draft: true
files: ./**/*.tar.gz
tag_name: ${{ steps.get_version.outputs.version }}
name: Namada ${{ steps.get_version.outputs.version-without-v }}