-
Notifications
You must be signed in to change notification settings - Fork 1
83 lines (69 loc) · 2.42 KB
/
premerge.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# This is a basic workflow to help you get started with Actions
name: pre-merge
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
pull_request:
branches: ["master"]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
api-test:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
fetch-depth: 1
ref: ${{ github.event.pull_request.head.ref }}
- name: install deps
run: |
python3 -m pip install --upgrade pip
python3 -m pip install jupyterlab sympy pillow scipy
- name: install py3d
run: python3 -m pip install -e py3d
- name: test
run: python3 test.py -d docs
- name: commit docs
run: |
git config user.email "hh11698@163.com"
git config user.name "Tumiz"
git add docs py3d/README.md README.md
git commit -m "update docs"
git push
- name: label
uses: actions/labeler@v4
# - name: get labels
# run: |
# labels="$(gh api repos/${{ github.repository_owner }}/${{ github.repository_owner }}/pulls/${{ github.event.pull_request.number }} --jq '.labels.[].name')"
# echo "$labels"
# shell: bash
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python3 -m
build
--sdist
--wheel
--outdir dist/
py3d
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI }}
- name: Merge pull requests (automerge-action)
uses: pascalgn/automerge-action@v0.15.6
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
MERGE_LABELS: "automerge,!work in progress"
MERGE_METHOD: "squash"
MERGE_COMMIT_MESSAGE: "pull-request-title"