Skip to content

Commit 591c14c

Browse files
committed
Overriding readme workflow to test new workflow
1 parent 386c9ba commit 591c14c

File tree

1 file changed

+88
-21
lines changed

1 file changed

+88
-21
lines changed

.github/workflows/readme.yml

Lines changed: 88 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,93 @@
1-
name: Test README
1+
# name: Test README
2+
3+
# on:
4+
# push:
5+
# pull_request:
6+
# types: [opened, reopened]
7+
8+
# jobs:
9+
# readme:
10+
# runs-on: ${{ matrix.os }}
11+
# strategy:
12+
# matrix:
13+
# python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
14+
# os: [ubuntu-latest, macos-latest]
15+
# steps:
16+
# - uses: actions/checkout@v1
17+
# - name: Set up Python ${{ matrix.python-version }}
18+
# uses: actions/setup-python@v2
19+
# with:
20+
# python-version: ${{ matrix.python-version }}
21+
# - name: Install dependencies
22+
# run: |
23+
# python -m pip install --upgrade pip
24+
# python -m pip install invoke tomli rundoc .
25+
# - name: Run the README.md
26+
# run: invoke readme
27+
name: Release
228

329
on:
4-
push:
5-
pull_request:
6-
types: [opened, reopened]
30+
workflow_dispatch:
31+
inputs:
32+
candidate:
33+
description: 'If true, this creates a release candidate.'
34+
required: true
35+
type: boolean
36+
default: true
37+
test_pypi:
38+
description: 'If true, this will push to the test pypi instead of regular.'
39+
type: boolean
40+
default: false
741

842
jobs:
9-
readme:
10-
runs-on: ${{ matrix.os }}
11-
strategy:
12-
matrix:
13-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
14-
os: [ubuntu-latest, macos-latest]
43+
release:
44+
runs-on: ubuntu-latest
1545
steps:
16-
- uses: actions/checkout@v1
17-
- name: Set up Python ${{ matrix.python-version }}
18-
uses: actions/setup-python@v2
19-
with:
20-
python-version: ${{ matrix.python-version }}
21-
- name: Install dependencies
22-
run: |
23-
python -m pip install --upgrade pip
24-
python -m pip install invoke tomli rundoc .
25-
- name: Run the README.md
26-
run: invoke readme
46+
- uses: actions/checkout@v4
47+
- name: Set up Python
48+
uses: actions/setup-python@v5
49+
with:
50+
python-version: '3.13'
51+
52+
- name: Install dependencies
53+
run: |
54+
python -m pip install --upgrade pip
55+
python -m pip install .[dev]
56+
57+
- name: Configure Git user
58+
run: |
59+
git config user.name "SDV Team"
60+
git config user.email "[email protected]"
61+
git remote set-url origin https://x-access-token:${{ secrets.GH_ACCESS_TOKEN }}@github.com/${{ github.repository }}
62+
63+
- name: Merge main to stable and push tags
64+
if: ${{ !inputs.candidate }}
65+
run: |
66+
make check-release
67+
make git-merge-main-stable
68+
make bumpversion-release
69+
make git-push-tags-stable
70+
71+
- name: Create wheel
72+
run: |
73+
make check-main
74+
make dist
75+
76+
- name: Publish a Python distribution to PyPI
77+
uses: pypa/gh-action-pypi-publish@release/v1
78+
with:
79+
password: ${{ inputs.test_pypi && secrets.TEST_PYPI_API_TOKEN || secrets.PYPI_API_TOKEN }}
80+
repository-url: ${{ inputs.test_pypi && 'https://test.pypi.org/legacy/' || 'https://pypi.org' }}
81+
82+
- name: Bump to next candidate
83+
if: ${{ inputs.candidate }}
84+
run: |
85+
make bumpversion-candidate
86+
make git-push
87+
88+
- name: Merge to main and bump to next patch
89+
if: ${{ !inputs.candidate }}
90+
run: |
91+
make git-merge-stable-main
92+
make bumpversion-patch
93+
make git-push

0 commit comments

Comments
 (0)