Skip to content

Bump version to v0.5.0 #6

Bump version to v0.5.0

Bump version to v0.5.0 #6

Workflow file for this run

---
name: release
on:
push:
tags:
- "v*"
jobs:
release:
name: Release
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
submodules: true
# To fetch tags, but can this be improved using blobless checkout?
# [1]. But anyway right it is not important, and unlikely will be,
# since the repository is small.
#
# [1]: https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
fetch-depth: 0
# Workaround for https://github.com/actions/checkout/issues/882
- name: Fix tags for release
# will break on a lightweight tag
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Install dependencies
run: |
# Stick to the 0.23.0 due to issue with static linking on 0.24.0 [1].
# [1]: https://github.com/indygreg/PyOxidizer/issues/673
pip install PyOxidizer==0.23.0
# nfpm
curl -sS -Lo /tmp/nfpm.deb "https://github.com/goreleaser/nfpm/releases/download/v2.25.0/nfpm_amd64.deb"
sudo dpkg -i /tmp/nfpm.deb
- name: Build
run: |
set -x
# debug
git describe
git tag --sort="-v:refname"
# test
git describe | grep -x "$GITHUB_REF_NAME"
# for building cityhash for clickhouse-rs
sudo apt-get install -y musl-tools
# gcc cannot do cross compile, and there is no musl-g++ in musl-tools
sudo ln -srf /usr/bin/clang /usr/bin/musl-g++
# musl for static binaries
rustup target add x86_64-unknown-linux-musl
make packages target=x86_64-unknown-linux-musl
for postfix in .x86_64.rpm -x86_64.pkg.tar.zst _amd64.deb; do
cp chdig*$postfix chdig-latest$postfix
done
- name: Check package
run: |
sudo dpkg -i *.deb
chdig --help
chdig --version
# test
chdig --version | grep -x "chdig ${GITHUB_REF_NAME/v}"
- uses: "marvinpinto/action-automatic-releases@latest"
with:
prerelease: false
repo_token: "${{ secrets.GITHUB_TOKEN }}"
files: |
*.deb
*.rpm
*.tar.*