name: Prepare new release on: create: branches: - 'create_release/*' jobs: release: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: Install latest stable uses: actions-rs/toolchain@v1 with: toolchain: stable override: true profile: minimal - name: Install cargo-edit uses: baptiste0928/cargo-install@v1 with: crate: cargo-edit version: 0.9.1 - name: Determine version id: vars uses: actions/github-script@v5 with: script: | const { GITHUB_REF } = process.env const version = GITHUB_REF.replace('refs/heads/create_release/', '') console.log(`Got the following version: ${version}`) return version result-encoding: string - name: Bump version run: | cargo set-version --workspace ${{ steps.vars.outputs.result }} cargo generate-lockfile - name: Create Pull Request uses: peter-evans/create-pull-request@v4 with: title: "Create release ${{ steps.vars.outputs.result }}" commit-message: "Create release ${{ steps.vars.outputs.result }}" body: "Create release ${{ steps.vars.outputs.result }}" branch: main