From b7812a9815ecef676cb690c9d40ba8b88c9b7192 Mon Sep 17 00:00:00 2001 From: buffalu <85544055+buffalu@users.noreply.github.com> Date: Tue, 6 Feb 2024 13:50:54 -0600 Subject: [PATCH] v1.17 release learnings (#39) --- .github/workflows/ci.yaml | 8 ++++++-- release | 13 ++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 912a5ac..5f76d36 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -2,11 +2,15 @@ name: Geyser CI on: push: - branches: [ master ] + branches: + - master + - 'v*.*' tags: - 'v*.*.*' pull_request: - branches: [ master ] + branches: + - master + - 'v*.*' jobs: lint: diff --git a/release b/release index 0410dd8..5be2454 100755 --- a/release +++ b/release @@ -1,2 +1,13 @@ #!/usr/bin/env sh -cargo workspaces version --all --exact --no-individual-tags \ No newline at end of file + +# Get the current branch name +current_branch=$(git rev-parse --abbrev-ref HEAD) + +branch_pattern="^v[0-9]+\.[0-9]+$" + +if [[ $current_branch =~ $branch_pattern ]] || [ "$current_branch" = "master" ]; then + # If the current branch is a version branch or master, run the cargo workspaces version command + cargo workspaces version --all --exact --no-individual-tags --allow-branch $current_branch +else + echo "Current branch does not match the allowed patterns." +fi