2020-03-02 01:46:35 +08:00
|
|
|
# part of our release process, see `release-on-comment.py`
|
|
|
|
name: release on comment
|
|
|
|
|
|
|
|
on:
|
|
|
|
issues:
|
|
|
|
types: [opened, edited]
|
|
|
|
issue_comment:
|
|
|
|
types: [created, edited]
|
|
|
|
|
2021-05-16 16:17:05 +08:00
|
|
|
# Set permissions at the job level.
|
|
|
|
permissions: {}
|
|
|
|
|
2020-03-02 01:46:35 +08:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2021-05-16 16:17:05 +08:00
|
|
|
permissions:
|
2021-05-16 16:37:21 +08:00
|
|
|
contents: write
|
|
|
|
issues: write
|
2020-03-02 01:46:35 +08:00
|
|
|
|
2020-03-11 20:54:56 +08:00
|
|
|
if: (github.event.comment && startsWith(github.event.comment.body, '@pytestbot please')) || (github.event.issue && !github.event.comment && startsWith(github.event.issue.body, '@pytestbot please'))
|
2020-03-02 01:46:35 +08:00
|
|
|
|
|
|
|
steps:
|
2020-05-08 18:03:51 +08:00
|
|
|
- uses: actions/checkout@v2
|
2020-06-02 15:29:36 +08:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2021-05-16 16:17:05 +08:00
|
|
|
persist-credentials: false
|
2020-05-08 18:03:51 +08:00
|
|
|
|
2020-03-02 01:46:35 +08:00
|
|
|
- name: Set up Python
|
2020-12-19 02:44:20 +08:00
|
|
|
uses: actions/setup-python@v2
|
2020-03-02 01:46:35 +08:00
|
|
|
with:
|
|
|
|
python-version: "3.8"
|
2021-05-16 16:17:05 +08:00
|
|
|
|
2020-03-02 01:46:35 +08:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install --upgrade setuptools tox
|
2021-05-16 16:17:05 +08:00
|
|
|
|
2020-03-02 01:46:35 +08:00
|
|
|
- name: Prepare release
|
|
|
|
run: |
|
2021-05-16 16:37:21 +08:00
|
|
|
tox -e release-on-comment -- $GITHUB_EVENT_PATH ${{ github.token }}
|