Bump Clickhouse to 1.0.5 #3
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
# on merge to main from a branch named release-*, create a tag based on version in Cargo.toml | |
name: Tag Release on merge to main | |
on: | |
pull_request: | |
types: | |
- closed | |
branches: | |
- main | |
jobs: | |
build: | |
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release-') | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.merge_commit_sha }} | |
fetch-depth: '0' | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- name: Read version from Cargo.toml | |
id: read-version | |
run: | | |
CARGO_VERSION="$(cargo metadata --format-version=1 | jq -r '.packages | .[] | select(.name == "ndc-clickhouse-cli") | .version')" | |
echo("RELEASE_VERSION=$CARGO_VERSION") >> $GITHUB_ENV | |
- name: Push Tag | |
uses: anothrNick/github-tag-action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
RELEASE_BRANCHES: release-.* | |
CUSTOM_TAG: v${{ env.RELEASE_VERSION }} |