Skip to content
Merged
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
30 changes: 25 additions & 5 deletions .github/workflows/python_deploy_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:
jobs:
call-workflow-conda-publish:
name: Publish development conda package on JFrog Artifactory
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-publish_rattler_package.yml@7241532854727d993872b67fc761139b8438615b # v3.12.0
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-publish_rattler_package.yml@b2de1e00a0be160d8cf6e14716825673070bf264 # v3.13.0
permissions:
contents: write
with:
Expand All @@ -28,17 +28,37 @@ jobs:
JFROG_ARTIFACTORY_URL: ${{ secrets.JFROG_ARTIFACTORY_URL }}
JFROG_ARTIFACTORY_TOKEN: ${{ secrets.JFROG_ARTIFACTORY_TOKEN }}
call-workflow-pypi-publish:
name: Publish development pypi package (JFrog Artifactory, TestPyPI)
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-publish_pypi_package.yml@7241532854727d993872b67fc761139b8438615b # v3.12.0
name: Publish development pypi package (JFrog Artifactory)
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-publish_pypi_package.yml@b2de1e00a0be160d8cf6e14716825673070bf264 # v3.13.0
permissions:
contents: write
with:
package-manager: 'poetry'
package-name: 'mira-omf'
version-tag: ${{ github.ref_name }}
python-version: '3.12'
virtual-repo-names: '["public-pypi-dev", "test-pypi"]'
virtual-repo-names: '["public-pypi-dev"]'
secrets:
JFROG_ARTIFACTORY_URL: ${{ secrets.JFROG_ARTIFACTORY_URL }}
JFROG_ARTIFACTORY_TOKEN: ${{ secrets.JFROG_ARTIFACTORY_TOKEN }}
PYPI_TOKEN: ${{ secrets.TEST_PYPI_TOKEN }}
publish-pypi-package:
name: Publish development Python package to TestPyPI
needs: call-workflow-pypi-publish
if: ${{ needs.call-workflow-pypi-publish.result == 'success' && needs.call-workflow-pypi-publish.outputs.is-publishable == 'true' }}
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Download build artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: mira-omf-pip-package-build
path: dist-download
# Must be a direct step (not in a reusable workflow or composite action), see
# https://docs.pypi.org/trusted-publishers/troubleshooting/#reusable-workflows-on-github
- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247 # v1.14.1
with:
packages-dir: dist-download/
repository-url: https://test.pypi.org/legacy/
30 changes: 25 additions & 5 deletions .github/workflows/python_deploy_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
name: Publish production Conda package on JFrog Artifactory
needs: validate-release-tag
if: ${{ github.event_name == 'release' || github.event.inputs.publish-conda == 'true' }}
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-release_conda_assets.yml@7241532854727d993872b67fc761139b8438615b # v3.12.0
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-release_conda_assets.yml@b2de1e00a0be160d8cf6e14716825673070bf264 # v3.13.0
permissions:
contents: write
with:
Expand All @@ -63,17 +63,37 @@ jobs:
JFROG_ARTIFACTORY_URL: ${{ secrets.JFROG_ARTIFACTORY_URL }}
JFROG_ARTIFACTORY_TOKEN: ${{ secrets.JFROG_ARTIFACTORY_TOKEN }}
call-workflow-pypi-release:
name: Publish production PyPI package (JFrog Artifactory, PyPI)
name: Publish production PyPI package (JFrog Artifactory)
needs: validate-release-tag
if: ${{ github.event_name == 'release' || github.event.inputs.publish-pypi == 'true' }}
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-release_pypi_assets.yml@7241532854727d993872b67fc761139b8438615b # v3.12.0
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-release_pypi_assets.yml@b2de1e00a0be160d8cf6e14716825673070bf264 # v3.13.0
permissions:
contents: write
with:
package-name: 'mira-omf'
virtual-repo-names: '["public-pypi-prod", "pypi"]'
virtual-repo-names: '["public-pypi-prod"]'
release-tag: ${{ github.event.release.tag_name || github.ref_name }}
secrets:
JFROG_ARTIFACTORY_URL: ${{ secrets.JFROG_ARTIFACTORY_URL }}
JFROG_ARTIFACTORY_TOKEN: ${{ secrets.JFROG_ARTIFACTORY_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
publish-pypi-release:
name: Publish production Python package to PyPI
needs: [validate-release-tag, call-workflow-pypi-release]
if: ${{ (github.event_name == 'release' || github.event.inputs.publish-pypi == 'true') && needs.call-workflow-pypi-release.result == 'success' }}
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Download release assets
uses: MiraGeoscience/CI-tools/.github/actions/reusable-python-download_dist_release@b2de1e00a0be160d8cf6e14716825673070bf264 # v3.13.0
with:
release-tag: ${{ github.event.release.tag_name || github.ref_name }}
github-token: ${{ secrets.GITHUB_TOKEN }}
# Must be a direct step (not in a reusable workflow or composite action), see
# https://docs.pypi.org/trusted-publishers/troubleshooting/#reusable-workflows-on-github
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247 # v1.14.1
with:
packages-dir: dist-download/
repository-url: https://upload.pypi.org/legacy/
Loading