Skip to content

Python pre-release

Python pre-release #17

name: "Python pre-release"
# This workflow is triggered manually, and requires the input of a segment identifier. This will be
# appended to the version, e.g. 6.1.3-dev0.
on:
workflow_dispatch:
inputs:
segmentIdentifier:
description: "Pre-release identifier"
required: true
default: ".dev0"
env:
# The add-exports and add-opens flags are required for Java 17
MAVEN_OPTS: --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED
jobs:
deploy-python-pre-release:
name: Python pre-release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# This is required so that git-commit-id-plugin can find the latest tag.
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: "zulu"
- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Run the deploy goal with Maven
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
mvn --batch-mode deploy \
-pl lib/python -am \
-PpythonPreRelease \
-DskipTests \
-Dpathling.pyapi.version.qualifier=${{ github.event.inputs.segmentIdentifier }}
timeout-minutes: 30