Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions .github/workflows/reusable-python-build_poetry_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ on:
description: Python version to use (e.g. 3.10)
required: true
type: string
version-tag:
description: Version tag of the package to build
required: true
type: string
virtual-repo-names:
description: 'List of repository names to resolve on (e.g. ["public-pypi-dev"])'
required: true
Expand All @@ -41,9 +37,6 @@ on:
build-dir-path:
description: Path to the build directory
value: ${{ jobs.build_package.outputs.build-dir-path }}
version:
description: Version of the package
value: ${{ jobs.build_package.outputs.version }}
secrets:
JFROG_ARTIFACTORY_URL:
description: JFrog Artifactory URL
Expand All @@ -63,30 +56,13 @@ jobs:
timeout-minutes: ${{ inputs.timeout-minutes }}
outputs:
build-dir-path: ${{ steps.define-build-path.outputs.dir-path }}
version: ${{ steps.get-version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
lfs: ${{ inputs.lfs }}
fetch-depth: 0
persist-credentials: false
- name: Get version
id: get-version
env:
INPUTS_VERSION_TAG: ${{ inputs.version-tag }}
run: |
if [ "${INPUTS_VERSION_TAG}" = "v0.0.0" ]; then
Comment thread
sebhmg marked this conversation as resolved.
echo "Version tag not available"
exit 1
fi
VERSION=$(echo "${INPUTS_VERSION_TAG}" | sed 's/v//')
echo "version: ${VERSION}"
if [ -z "${VERSION}" ]; then
echo "Version is not available"
exit 1
fi
echo "version=${VERSION}" >> $GITHUB_OUTPUT
- uses: jfrog/setup-jfrog-cli@v4.9.1
name: Setup JFrog CLI
env:
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/reusable-python-build_setuptools_package.yml
Comment thread
sebhmg marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ on:
description: Python version to use (e.g. 3.10)
required: true
type: string
version-tag:
description: Version tag of the package to build
required: true
type: string
virtual-repo-names:
description: 'List of repository names to resolve on (e.g. ["public-pypi-dev"])'
required: true
Expand All @@ -36,9 +32,6 @@ on:
build-dir-path:
description: Path to the build directory
value: ${{ jobs.build_package.outputs.build-dir-path }}
version:
description: Version of the package
value: ${{ jobs.build_package.outputs.version }}
secrets:
JFROG_ARTIFACTORY_URL:
description: JFrog Artifactory URL
Expand All @@ -58,30 +51,13 @@ jobs:
timeout-minutes: ${{ inputs.timeout-minutes }}
outputs:
build-dir-path: ${{ steps.define-build-path.outputs.dir-path }}
version: ${{ steps.get-version.outputs.version }}
steps:
Comment thread
sebhmg marked this conversation as resolved.
- name: Checkout
uses: actions/checkout@v6
with:
lfs: ${{ inputs.lfs }}
fetch-depth: 0
persist-credentials: false
- name: Get version
id: get-version
env:
INPUTS_VERSION_TAG: ${{ inputs.version-tag }}
run: |
Comment thread
sebhmg marked this conversation as resolved.
if [ "${INPUTS_VERSION_TAG}" = "v0.0.0" ]; then
echo "Version tag not available"
exit 1
fi
VERSION=$(echo "${INPUTS_VERSION_TAG}" | sed 's/v//')
echo "version: ${VERSION}"
if [ -z "${VERSION}" ]; then
echo "Version is not available"
exit 1
fi
echo "version=${VERSION}" >> $GITHUB_OUTPUT
- uses: jfrog/setup-jfrog-cli@v4.9.1
name: Setup JFrog CLI
env:
Expand Down
31 changes: 20 additions & 11 deletions .github/workflows/reusable-python-publish_pypi_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ on:
description: Version tag of the package to build (defaults to github.ref_name if not provided)
required: false
type: string
publish-dev-tag:
description: Whether to publish a "dev" version of the package. By default a "dev" version tag is built but not published.
required: false
type: boolean
default: false
secrets:
JFROG_ARTIFACTORY_URL:
description: JFrog Artifactory URL
Expand All @@ -66,13 +71,12 @@ jobs:
build_poetry_package:
name: Build poetry package
if: ${{ inputs.package-manager == 'poetry' && github.repository_owner == 'MiraGeoscience' }}
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-build_poetry_package.yml@v3
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-build_poetry_package.yml@v3.8.0-alpha.1
with:
package-name: ${{ inputs.package-name }}
source-path: ${{ inputs.source-path || '.' }}
python-version: ${{ inputs.python-version }}
lfs: ${{ inputs.lfs }}
version-tag: ${{ inputs.version-tag || github.ref_name }}
virtual-repo-names: ${{ inputs.virtual-repo-names }}
os: ${{ inputs.os }}
timeout-minutes: ${{ inputs.timeout-minutes }}
Expand All @@ -83,12 +87,11 @@ jobs:
build_setuptools_package:
name: Build setuptools package
if: ${{ inputs.package-manager == 'setuptools' && github.repository_owner == 'MiraGeoscience' }}
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-build_setuptools_package.yml@v3
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-build_setuptools_package.yml@v3.8.0-alpha.1
with:
package-name: ${{ inputs.package-name }}
python-version: ${{ inputs.python-version }}
lfs: ${{ inputs.lfs }}
version-tag: ${{ inputs.version-tag || github.ref_name }}
virtual-repo-names: ${{ inputs.virtual-repo-names }}
os: ${{ inputs.os }}
timeout-minutes: ${{ inputs.timeout-minutes }}
Expand All @@ -98,30 +101,34 @@ jobs:

is_publishable:
name: Check version publishability
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-version-check.yml@v3
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-version-check.yml@v3.8.0-alpha.1
with:
version-tag: ${{ inputs.version-tag || github.ref_name }}

publish_package:
name: Publish package
needs: [ build_poetry_package, build_setuptools_package, is_publishable ]
if: ${{ always() && contains(needs.*.result, 'success') && !contains(needs.*.result, 'failure') && github.repository_owner == 'MiraGeoscience' && needs.is_publishable.outputs.is-publishable == 'true' }}
if: |
always() &&
contains(needs.*.result, 'success') && !contains(needs.*.result, 'failure') &&
github.repository_owner == 'MiraGeoscience' &&
(needs.is_publishable.outputs.is-publishable == 'true' || inputs.publish-dev-tag)
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
virtual-repo-name: ${{ fromJson(inputs.virtual-repo-names) }}
env:
VERSION_TAG: ${{ inputs.version-tag || github.ref_name }}
steps:
- name: Select build outputs form the correct job
id: select-build-outputs
run: |
if [[ "${{ needs.build_poetry_package.result }}" == "success" ]]; then
echo "build-dir-path=${{ needs.build_poetry_package.outputs.build-dir-path }}" >> $GITHUB_ENV
echo "version=${{ needs.build_poetry_package.outputs.version }}" >> $GITHUB_ENV
elif [[ "${{ needs.build_setuptools_package.result }}" == "success" ]]; then
echo "build-dir-path=${{ needs.build_setuptools_package.outputs.build-dir-path }}" >> $GITHUB_ENV
echo "version=${{ needs.build_setuptools_package.outputs.version }}" >> $GITHUB_ENV
else
echo "No successful build found"
exit 1
Expand All @@ -132,11 +139,13 @@ jobs:
name: ${{ inputs.package-name }}-pip-package-build
path: ${{ env.build-dir-path }}
- name: Publish package to Artifactory
uses: MiraGeoscience/CI-tools/.github/actions/reusable-python-publish_to_artifactory@v3
uses: MiraGeoscience/CI-tools/.github/actions/reusable-python-publish_to_artifactory@v3.8.0-alpha.1
if: ${{ matrix.virtual-repo-name != 'pypi' && matrix.virtual-repo-name != 'test-pypi' }}
env:
VERSION_NUMBER: ${{ startsWith(env.VERSION_TAG, 'v') && substring(env.VERSION_TAG, 1) || env.VERSION_TAG }}
with:
build-dir-path: ${{ env.build-dir-path }}
artifactory-dir-path: ${{ matrix.virtual-repo-name }}/${{ inputs.package-name }}/${{ env.version }}
artifactory-dir-path: ${{ matrix.virtual-repo-name }}/${{ inputs.package-name }}/${{ env.VERSION_NUMBER }}
JFROG_ARTIFACTORY_URL: ${{ secrets.JFROG_ARTIFACTORY_URL }}
JFROG_ARTIFACTORY_TOKEN: ${{ secrets.JFROG_ARTIFACTORY_TOKEN }}
- name: Publish package to PyPI
Expand All @@ -158,7 +167,7 @@ jobs:
timeout-minutes: 5
steps:
- name: Get draft release
uses: MiraGeoscience/CI-tools/.github/actions/reusable-get_draft_release@v3
uses: MiraGeoscience/CI-tools/.github/actions/reusable-get_draft_release@v3.8.0-alpha.1
id: get-draft-release
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/reusable-python-publish_rattler_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ on:
description: Version tag of the package to build (defaults to github.ref_name if not provided)
required: false
type: string
publish-dev-tag:
description: Whether to publish a "dev" version of the package. By default a "dev" version tag is built but not published.
required: false
type: boolean
default: false
build-experimental:
description: Enable rattler-build experimental features
required: false
Expand Down Expand Up @@ -153,14 +158,14 @@ jobs:

is_publishable:
name: Check version publishability
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-version-check.yml@v3
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-version-check.yml@v3.8.0-alpha.1
with:
version-tag: ${{ inputs.version-tag || github.ref_name }}

publish_package:
name: Publish package
needs: [build_rattler_package, is_publishable]
if: ${{ github.repository_owner == 'MiraGeoscience' && needs.is_publishable.outputs.is-publishable == 'true' }}
if: ${{ github.repository_owner == 'MiraGeoscience' && (needs.is_publishable.outputs.is-publishable == 'true' || inputs.publish-dev-tag) }}
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
Expand All @@ -173,7 +178,7 @@ jobs:
name: ${{ inputs.package-name }}-conda-package-build
path: build-dir
- name: Publish package to Artifactory
uses: MiraGeoscience/CI-tools/.github/actions/reusable-python-publish_to_artifactory@v3
uses: MiraGeoscience/CI-tools/.github/actions/reusable-python-publish_to_artifactory@v3.8.0-alpha.1
with:
build-dir-path: build-dir/noarch
artifactory-dir-path: ${{ matrix.publish-repo-name}}/noarch
Expand All @@ -189,7 +194,7 @@ jobs:
timeout-minutes: 5
steps:
- name: Get draft release
uses: MiraGeoscience/CI-tools/.github/actions/reusable-get_draft_release@v3
uses: MiraGeoscience/CI-tools/.github/actions/reusable-get_draft_release@v3.8.0-alpha.1
id: get-draft-release
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-python-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- uses: MiraGeoscience/CI-tools/.github/actions/reusable-python-setup_conda@v3
- uses: MiraGeoscience/CI-tools/.github/actions/reusable-python-setup_conda@v3.8.0-alpha.1
name: Setup conda env
if: ${{ inputs.package-manager == 'conda' }}
env:
Expand All @@ -145,7 +145,7 @@ jobs:
JFROG_ARTIFACTORY_URL: ${{ secrets.JFROG_ARTIFACTORY_URL }}
JFROG_ARTIFACTORY_TOKEN: ${{ secrets.JFROG_ARTIFACTORY_TOKEN }}

- uses: MiraGeoscience/CI-tools/.github/actions/reusable-python-setup_poetry@v3
- uses: MiraGeoscience/CI-tools/.github/actions/reusable-python-setup_poetry@v3.8.0-alpha.1
name: Setup poetry env
if: ${{ inputs.package-manager == 'poetry' }}
with:
Expand Down
Loading