Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions .github/workflows/release-rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,17 @@
# https://github.com/apache/infrastructure-actions/blob/main/actions.yml

name: Publish Rust
run-name: "Rust Release: ${{ github.ref_name }}"
run-name: "Rust Release: ${{ inputs.tag || github.ref_name }}"

on:
push:
tags: ["v*"]
workflow_dispatch:
inputs:
tag:
description: "Existing release tag to publish (for example, v1.7.3)"
required: true
type: string

permissions:
contents: read
Expand All @@ -33,16 +39,27 @@ jobs:
publish-rust:
runs-on: ubuntu-latest
if: github.repository == 'apache/fory' && !startsWith(github.ref_name, 'go/fory')
env:
RELEASE_TAG: ${{ inputs.tag || github.ref_name }}
steps:
# Retry old releases with current approved actions while preserving their source tag.
- name: Validate release tag
shell: bash
run: |
set -euo pipefail
[[ "$RELEASE_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]+)?$ ]]

- uses: actions/checkout@v5
with:
ref: refs/tags/${{ inputs.tag || github.ref_name }}

- uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4 # stable

- name: Bump rust version
shell: bash
run: |
set -euo pipefail
VERSION="${{ github.ref_name }}"
VERSION="$RELEASE_TAG"
VERSION="${VERSION#v}"
python ci/release.py bump_version -l rust -version "$VERSION"

Expand Down
Loading