-
Notifications
You must be signed in to change notification settings - Fork 9
54 lines (43 loc) · 1.42 KB
/
release-prepare.yml
File metadata and controls
54 lines (43 loc) · 1.42 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Release Prepare
on:
workflow_dispatch:
inputs:
tag:
type: string
required: true
description: "Tag for the next release. Ex.: v1.0.0"
env:
NEXT_RELEASE_TAG: ${{ github.event.inputs.tag }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
prepare-release-and-pull-request:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Prepare Python
uses: actions/setup-python@v5
with:
cache: 'pip'
- name: Install dependencies
run: pip install -r ./tools/release/requirements.txt
- name: Update source code versions
run: ./tools/release/update_versions.py
- name: Setup Ninja
run: sudo apt-get install ninja-build
- name: Build
run: cmake -B build -G Ninja && cmake --build build
- name: Test
run: ctest --output-on-failure --test-dir build
- name: Create PR with code updates for new release
uses: peter-evans/create-pull-request@v7
with:
commit-message: "chore: release ${{ env.NEXT_RELEASE_TAG }}"
branch: "release/${{ env.NEXT_RELEASE_TAG }}"
title: "chore: release ${{ env.NEXT_RELEASE_TAG }}"
body: |
This pull PR updates the source code version to ${{ env.NEXT_RELEASE_TAG }}
delete-branch: true
sign-commits: true