Skip to content

chore: prepare v0.20.6 release (#844) #28

chore: prepare v0.20.6 release (#844)

chore: prepare v0.20.6 release (#844) #28

Workflow file for this run

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
name: Release
on:
workflow_dispatch:
push:
# only for formal releases, not for release candidates
tags: ["v[0-9]+.[0-9]+.[0-9]+"]
pull_request:
branches:
- main
paths:
- ".github/scripts/release_rust/**"
- ".github/workflows/bootstrap_rust_crates.yml"
- ".github/workflows/release.yml"
- ".asf.yaml"
- "Cargo.toml"
- "**/Cargo.toml"
- "release/scripts/bootstrap-rust-crates.sh"
env:
CARGO_TERM_COLOR: always
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
validate:
name: Validate Publish Plan
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.11"
- name: Test release helpers
run: python3 -m unittest discover -s .github/scripts/release_rust -p "test_*.py"
- name: Check bootstrap helper syntax
run: bash -n release/scripts/bootstrap-rust-crates.sh
- name: Show publish plan
run: python3 .github/scripts/release_rust/plan.py
- name: Verify workspace packages
run: cargo publish --workspace --dry-run
publish:
name: Publish Workspace
if: >-
github.event_name == 'push' &&
startsWith(github.ref, 'refs/tags/') &&
!contains(github.ref, '-')
needs: validate
runs-on: ubuntu-24.04
environment: release
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.11"
- name: Publish Rust crates
run: python3 .github/scripts/release_rust/publish.py