Release v0.4.12 (#568) #138
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: "[op-rbuilder] Release Candidate" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "crates/op-rbuilder/**" | |
| - "crates/p2p/**" | |
| workflow_dispatch: # manual trigger | |
| jobs: | |
| rc-release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| actions: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Create RC tag | |
| run: | | |
| # Get current version from Cargo.toml | |
| CURRENT_VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[] | select(.name == "op-rbuilder") | .version') | |
| # Bump patch version for RC (0.3.1 -> 0.3.2) | |
| IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT_VERSION" | |
| NEXT_PATCH=$((PATCH + 1)) | |
| VERSION="${MAJOR}.${MINOR}.${NEXT_PATCH}" | |
| # Find next RC number | |
| LATEST_RC=$(git tag -l "op-rbuilder/v${VERSION}-rc.*" | sort -V | tail -1) | |
| if [ -z "$LATEST_RC" ]; then | |
| NEXT_RC=1 | |
| else | |
| CURRENT_RC=$(echo "$LATEST_RC" | grep -oP 'rc\.\K\d+') | |
| NEXT_RC=$((CURRENT_RC + 1)) | |
| fi | |
| # Create tag | |
| TAG="op-rbuilder/v${VERSION}-rc.${NEXT_RC}" | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git tag -a "$TAG" -m "op-rbuilder v${VERSION}-rc.${NEXT_RC}" | |
| echo "Created tag: $TAG" | |
| echo "TAG=${TAG}" >> "$GITHUB_ENV" | |
| - name: Push tag | |
| run: | | |
| git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }} | |
| git push origin --tags | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Trigger release workflow | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| echo "Dispatching release workflow for ${TAG}" | |
| gh workflow run op_rbuilder_release.yaml \ | |
| --ref "${TAG}" \ | |
| -f build-binary=true \ | |
| -f build-docker=true \ | |
| -f draft-release=true |