This repository was archived by the owner on Apr 4, 2026. It is now read-only.
chore: bump version to 2026.2.3 #137
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| branches: [ main ] | |
| tags: [ 'v*' ] | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version to release (e.g., v0.1.0)' | |
| required: true | |
| type: string | |
| permissions: | |
| contents: write | |
| packages: write | |
| jobs: | |
| # Manual or tag-based release process | |
| release: | |
| name: Create Release | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/v') | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| # For manual releases, update version files first | |
| - name: Install Rust (for manual releases) | |
| if: github.event_name == 'workflow_dispatch' | |
| uses: dtolnay/rust-toolchain@1.92.0 | |
| - name: Update Cargo.toml and Cargo.lock version (Manual Release) | |
| if: github.event_name == 'workflow_dispatch' | |
| run: | | |
| NEW_VERSION="${VERSION#v}" | |
| sed -i "s/^version = \".*\"/version = \"$NEW_VERSION\"/" Cargo.toml | |
| cargo update --workspace | |
| env: | |
| VERSION: ${{ github.event.inputs.version }} | |
| - name: Install git-cliff | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: git-cliff | |
| - name: Generate changelog | |
| run: | | |
| VERSION_TAG="${{ github.event.inputs.version || github.ref_name }}" | |
| git-cliff --tag $VERSION_TAG -o CHANGELOG.md | |
| - name: Get version | |
| id: get_version | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT | |
| else | |
| echo "version=${{ github.ref_name }}" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: Release ${{ steps.get_version.outputs.version }} | |
| tag_name: ${{ steps.get_version.outputs.version }} | |
| body_path: CHANGELOG.md | |
| draft: false | |
| prerelease: false | |
| # Publish to crates.io after release is created | |
| publish: | |
| name: Publish to crates.io | |
| runs-on: ubuntu-latest | |
| needs: release | |
| if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/v') | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@1.92.0 | |
| - name: Install protoc | |
| run: sudo apt-get update && sudo apt-get install -y protobuf-compiler | |
| - name: Cache dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Verify package | |
| run: cargo package --no-verify | |
| - name: Publish to crates.io | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| run: cargo publish |