-
Notifications
You must be signed in to change notification settings - Fork 279
40 lines (40 loc) · 1.24 KB
/
create-release-pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Open a release PR
on:
workflow_dispatch:
inputs:
level:
description: Version bump level
required: true
type: choice
options:
- patch
jobs:
make-release-pr:
permissions:
id-token: write # Enable OIDC
pull-requests: write
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: chainguard-dev/actions/setup-gitsign@main
- name: Install cargo-release
uses: taiki-e/install-action@v1
with:
tool: cargo-release
- name: Update versions
id: update_versions
run: |
cargo release version patch --execute
cargo update
NEW_VERSION=$(cargo metadata --no-deps --format-version 1 | jq -rc '.packages[] | select(.name=="worker") | .version')
echo "version=$NEW_VERSION" >> "$GITHUB_OUTPUT"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
commit-message: chore: bump versions
branch: releases/v${{ steps.update_versions.outputs.version }}
base: main
title: Release v${{ steps.update_versions.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}