-
Notifications
You must be signed in to change notification settings - Fork 9
63 lines (57 loc) · 1.68 KB
/
prep-release.yaml
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
55
56
57
58
59
60
61
62
63
name: release-pr
on:
push:
branches:
- ops/support-automated-releases
# TODO: how should this be triggered?
# - prep-release-v[0-9]+\.[0-9]+\.[0-9]+
workflow_dispatch:
inputs:
version:
description: Version to release (ex. `v0.1.0`)
required: false
type: string
jobs:
make-release-pr:
permissions:
id-token: write
pull-requests: write
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Set up caching
- uses: Swatinem/rust-cache@v2
- name: Cache default PGRX_HOME
uses: actions/cache@v2
continue-on-error: false
with:
path: |
/home/runner/.pgrx
key: pg_idkit-pkg-rpm-pgrx-${{ matrix.config.rpm.arch }}-${{ runner.os }}
# Install deps
- uses: chainguard-dev/actions/setup-gitsign@main
- name: Install cargo-release
uses: taiki-e/install-action@v1
with:
tool: cargo-release,just,cargo-get,cargo-pgrx,git-cliff
# Initialize PGRX
- name: Initialize cargo-pgrx
run: |
[[ -d /home/runner/.pgrx ]] || cargo pgrx init
# Prep the project
- name: Determine version
id: determine-version
env:
VERSION: ${{inputs.version}}
run: |
echo value=$(just print-version) >> $GITHUB_OUTPUT
- name: Generate changelog
run: |
just changelog
# Create PR for release
- uses: cargo-bins/release-pr@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# TODO: We should configure the PR text
version: ${{ steps.determine-version.outputs.value }}