Skip to content

Chore: Temporarily enable manual workflow invocation #2

Chore: Temporarily enable manual workflow invocation

Chore: Temporarily enable manual workflow invocation #2

Workflow file for this run

---
name: "🧪 Test builds (matrix)"
on: # yamllint disable-line rule:truthy
workflow_dispatch:
pull_request:
types:
[opened, reopened, edited]
jobs:
pre-release:
# Don't run if pull request is NOT merged
if: github.event.pull_request.merged == true
runs-on: "ubuntu-latest"
continue-on-error: true
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
steps:
- name: "Populate environment variables"
id: setenv
run: |
echo "Action triggered by user: ${GITHUB_TRIGGERING_ACTOR}"
set -x
datetime=$(date +'%Y%m%d%H%M')
export datetime
echo "datetime=${datetime}" >> "$GITHUB_OUTPUT"
vernum="${{ matrix.python-version }}.${datetime}"
echo "vernum=${vernum}" >> "$GITHUB_OUTPUT"
- name: "Checkout repository"
uses: actions/checkout@v3
- name: "Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: "Install dependencies"
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: "Tag for test release"
# Delete all local tags, then create a synthetic tag for testing
# Use the date/time to avoid conflicts uploading to Test PyPI
run: |
scripts/dev-versioning.sh "${{ steps.setenv.outputs.vernum }}"
git tag | xargs -L 1 | xargs git tag --delete
git tag "v${{ steps.setenv.outputs.vernum }}"
git checkout "tags/v${{ steps.setenv.outputs.vernum }}"
grep version pyproject.toml
- name: "Build with TOX"
run: |
tox -e build