-
Notifications
You must be signed in to change notification settings - Fork 63
47 lines (45 loc) · 1.49 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Release drafter
# Push events to every tag not containing "/"
on:
push:
tags:
- "*"
jobs:
draft-a-release:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
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-ml'
issue-body: "Please approve or deny the release of opensearch-py-ml. **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: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Draft a release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
files: |
artifacts.tar.gz