diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index 83f160757a..a0c03dd87c 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -16,7 +16,7 @@ concurrency: cancel-in-progress: true env: - TAG_REGEX: '^rust-v[0-9]+\.[0-9]+\.[0-9]+$' + TAG_REGEX: '^rust-v[0-9]+\.[0-9]+\.[0-9]+(-(?:alpha|beta)(\.[0-9]+)?)?$' jobs: tag-check: diff --git a/codex-rs/scripts/create_github_release.sh b/codex-rs/scripts/create_github_release.sh index 87e498e2bf..033593dac0 100755 --- a/codex-rs/scripts/create_github_release.sh +++ b/codex-rs/scripts/create_github_release.sh @@ -1,6 +1,7 @@ #!/bin/bash set -euo pipefail +set -x # Change to the root of the Cargo workspace. cd "$(dirname "${BASH_SOURCE[0]}")/.." @@ -15,7 +16,11 @@ fi CURRENT_BRANCH=$(git symbolic-ref --short -q HEAD) # Create a new branch for the release and make a commit with the new version. -VERSION=$(printf '0.0.%d' "$(date +%y%m%d%H%M)") +if [ $# -ge 1 ]; then + VERSION="$1" +else + VERSION=$(printf '0.0.%d' "$(date +%y%m%d%H%M)") +fi TAG="rust-v$VERSION" git checkout -b "$TAG" perl -i -pe "s/^version = \".*\"/version = \"$VERSION\"/" Cargo.toml