release-dispatch #19
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-dispatch | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: Version to release | |
| required: true | |
| type: string | |
| jobs: | |
| propose-release: | |
| permissions: | |
| pull-requests: write | |
| contents: write | |
| runs-on: ubuntu-latest | |
| env: | |
| VERSION: "" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: "Setup toolchain" | |
| uses: "actions-rs/toolchain@v1" | |
| with: | |
| toolchain: "nightly" | |
| - run: | | |
| VERSION=${{ inputs.version }} | |
| VERSION=${VERSION#v} | |
| cargo install cargo-release --version 0.25.19 --locked | |
| cargo release version $VERSION --execute --no-confirm && cargo release replace --execute --no-confirm | |
| for dir in bin/persistent bin/ops bin/persistent-tee; do | |
| (cd $dir && cargo release version $VERSION --execute --no-confirm) | |
| done | |
| - id: version_info | |
| run: | | |
| cargo install cargo-get | |
| echo "version=$(cargo get workspace.package.version)" >> $GITHUB_OUTPUT | |
| - uses: peter-evans/create-pull-request@v7 | |
| with: | |
| token: ${{ secrets.CREATE_PR_TOKEN }} | |
| title: "release(prepare): v${{ steps.version_info.outputs.version }}" | |
| commit-message: "release(prepare): v${{ steps.version_info.outputs.version }}" | |
| branch: prepare-release | |
| base: main | |
| delete-branch: true |