4f66eb8ab9
* Add 2PR approval to release workflow Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com> * Update .github/workflows/release-drafter.yml Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com> Co-authored-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com> --------- Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com> Co-authored-by: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>
43 lines
1.3 KiB
YAML
43 lines
1.3 KiB
YAML
name: Release drafter
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
|
|
jobs:
|
|
draft-a-release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v3
|
|
- id: get_approvers
|
|
run: |
|
|
echo "approvers=$(cat .github/CODEOWNERS | grep @ | tr -d '* ' | sed 's/@/,/g' | sed 's/,//1')" >> $GITHUB_OUTPUT
|
|
- uses: trstringer/manual-approval@v1
|
|
with:
|
|
secret: ${{ github.TOKEN }}
|
|
approvers: ${{ steps.get_approvers.outputs.approvers }}
|
|
minimum-approvals: 2
|
|
issue-title: 'Release opensearch-py'
|
|
issue-body: "Please approve or deny the release of opensearch-py. **Tag**: ${{ github.ref_name }} **Commit**: ${{ github.sha }}"
|
|
exclude-workflow-initiator-as-approver: true
|
|
- name: Set up Python 3
|
|
uses: actions/setup-python@v3
|
|
with:
|
|
python-version: '3.x'
|
|
- name: Install build tools
|
|
run: |
|
|
python -m pip install --upgrade build
|
|
- name: Build project for distribution
|
|
run: |
|
|
python -m build
|
|
tar -zvcf artifacts.tar.gz dist
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
draft: true
|
|
generate_release_notes: true
|
|
files: |
|
|
artifacts.tar.gz
|