Skip to content

Commit 8855231

Browse files
committed
Add matrix to release.yml for easier configuration in the future, add manual workflow dispatch to allow for dry runs
1 parent 0e0f2a5 commit 8855231

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,45 @@
11
name: Release
22
on:
3+
workflow_dispatch:
4+
inputs:
5+
dry-run:
6+
type: boolean
7+
required: true
8+
default: true
39
release:
410
types: [published]
511

612
jobs:
713
publish:
814
name: Publish release to PyPI
9-
runs-on: ubuntu-latest
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest]
19+
python-version: [3.13]
1020
steps:
1121
- name: Checkout repo
1222
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
13-
- name: Set up Python
23+
- name: Set up Python ${{ matrix.python-version }}
1424
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
1525
with:
16-
python-version: 3.9
26+
python-version: ${{ matrix.python-version }}
1727
- name: Install dependencies
1828
run: pip install . --group build
1929
- name: Build package
2030
run: python -m build
2131
- name: Publish package to PyPI
32+
if: ${{ inputs.dry-run == 'false' }}
2233
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc
2334
with:
2435
user: __token__
2536
password: ${{ secrets.PYPI_PASSWORD }}
26-
- name: Generate API docs
37+
- name: Generate API reference docs
2738
run: |
2839
rm -rf ./docs/_build
2940
python -m tox -e docs
30-
- name: Upload docs
41+
- name: Upload API reference docs
42+
if: ${{ inputs.dry-run == 'false' }}
3143
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
3244
with:
3345
name: python_sdk_docs

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ jobs:
1616
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
1717
- name: Set up environment variables
1818
run: cp ./.env.template ./.env
19-
- name: Run docker-compose with Splunk ${{ matrix.splunk-version }}
19+
- name: Launch Splunk ${{ matrix.splunk-version }}
2020
run: SPLUNK_VERSION=${{ matrix.splunk-version }} docker compose up -d
21-
- name: Set up Python
21+
- name: Set up Python ${{ matrix.python-version }}
2222
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
2323
with:
2424
python-version: ${{ matrix.python-version }}
25-
- name: Install Python dependencies to venv
25+
- name: Install dependencies
2626
run: pip install . --group test
2727
- name: Run test suite
2828
run: python -m tox -e py
29-
# [BJ] I'll obviously uncomment this step after I finish fiddling
29+
# [BJ] I'll uncomment this step after I finish fiddling
3030
# fossa-scan:
3131
# uses: splunk/oss-scanning-public/.github/workflows/oss-scan.yml@main
3232
# secrets: inherit

0 commit comments

Comments
 (0)