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