-
Notifications
You must be signed in to change notification settings - Fork 34
33 lines (31 loc) · 1.14 KB
/
release-drafter.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
name: Draft a release
on:
push:
tags:
- "*"
jobs:
draft-a-release:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
steps:
- name: Checkout
uses: actions/checkout@v4
- id: get_data
run: |
echo "approvers=$(cat .github/CODEOWNERS | grep @ | tr -d '* ' | sed 's/@/,/g' | sed 's/,//1')" >> $GITHUB_OUTPUT
echo "version=$(cat opensearch/Cargo.toml | grep ^version | tr -d "\"")" >> $GITHUB_OUTPUT
- uses: trstringer/manual-approval@v1
with:
secret: ${{ github.TOKEN }}
approvers: ${{ steps.get_data.outputs.approvers }}
minimum-approvals: 1
issue-title: 'Release opensearch-rs ${{ steps.get_data.outputs.version }}'
issue-body: "Please approve or deny the release of opensearch-rs. <br> **${{ steps.get_data.outputs.version }}** <br> **TAG**: ${{ github.ref_name }} <br> **COMMIT**: ${{ github.sha }}"
exclude-workflow-initiator-as-approver: true
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
generate_release_notes: true