Skip to content

Commit fa56bac

Browse files
committed
update github pipelines for deployment
1 parent 98a427c commit fa56bac

2 files changed

Lines changed: 35 additions & 20 deletions

File tree

.github/workflows/python_deploy_dev.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 'v*' # Push events to every version tag (eg. v1.0.0)
77

88
concurrency:
9-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
9+
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
1010
cancel-in-progress: true
1111

1212
jobs:
@@ -16,20 +16,21 @@ jobs:
1616
with:
1717
package-name: 'grid-apps'
1818
python-version: '3.10'
19-
source-repo-names: '["public-conda-dev-local", "geophysics-conda-dev-local", "geology-conda-dev-local", "conda-forge-dev-remote", "conda-pytorch-dev-remote"]'
20-
publish-repo-names: '["geophysics-conda-dev", "geology-conda-dev"]'
19+
source-repo-names: '["public-noremote-conda-dev"]'
20+
conda-channels: '["conda-forge"]'
21+
publish-repo-names: '["geology-noremote-conda-dev", "geophysics-noremote-conda-dev"]'
2122
secrets:
2223
JFROG_ARTIFACTORY_URL: ${{ secrets.JFROG_ARTIFACTORY_URL }}
2324
JFROG_ARTIFACTORY_TOKEN: ${{ secrets.JFROG_ARTIFACTORY_TOKEN }}
2425
call-workflow-pypi-publish:
25-
name: Publish development pypi package on JFrog Artifactory
26+
name: Publish development pypi package (JFrog Artifactory)
2627
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-publish_pypi_package.yml@main
2728
with:
2829
package-manager: 'poetry'
2930
package-name: 'grid-apps'
3031
version-tag: ${{ github.ref_name }}
3132
python-version: '3.10'
32-
virtual-repo-names: '["geophysics-pypi-dev", "geology-pypi-dev"]'
33+
virtual-repo-names: '["geology-pypi-dev", "geophysics-pypi-dev"]'
3334
secrets:
3435
JFROG_ARTIFACTORY_URL: ${{ secrets.JFROG_ARTIFACTORY_URL }}
3536
JFROG_ARTIFACTORY_TOKEN: ${{ secrets.JFROG_ARTIFACTORY_TOKEN }}

.github/workflows/python_deploy_prod.yml

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,46 @@ name: Deploy python package in production
22

33
on:
44
release:
5-
types: [published] # Trigger for draft release
5+
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
release-tag:
9+
description: 'Tag for the existing (draft) release to publish assets from'
10+
required: true
11+
publish-conda:
12+
description: 'Publish Conda package'
13+
required: false
14+
type: boolean
15+
default: true
16+
publish-pypi:
17+
description: 'Publish PyPI package'
18+
required: false
19+
type: boolean
20+
default: true
621

722
concurrency:
8-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
23+
group: ${{ github.workflow }}-${{ github.event.release.tag_name || github.event.inputs.release-tag || github.run_id }}
924
cancel-in-progress: true
1025

1126
jobs:
12-
call-workflow-conda-publish:
13-
name: Publish production conda package on JFrog Artifactory
14-
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-publish_conda_package.yml@main
27+
call-workflow-conda-release:
28+
name: Publish production Conda package on JFrog Artifactory
29+
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-release_conda_assets.yml@main
30+
if: ${{ github.event_name == 'release' || github.event.inputs.publish-conda == 'true' }}
1531
with:
16-
package-name: 'grid-apps'
17-
python-version: '3.10'
18-
virtual-repo-names: '["geophysics-conda-prod", "geology-conda-prod"]'
32+
virtual-repo-names: '["geology-conda-prod", "geophysics-conda-prod"]'
33+
release-tag: ${{ github.event.release.tag_name || github.event.inputs.release-tag }}
1934
secrets:
2035
JFROG_ARTIFACTORY_URL: ${{ secrets.JFROG_ARTIFACTORY_URL }}
2136
JFROG_ARTIFACTORY_TOKEN: ${{ secrets.JFROG_ARTIFACTORY_TOKEN }}
22-
call-workflow-pypi-publish:
23-
name: Publish production pypi package on JFrog Artifactory
24-
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-publish_pypi_package.yml@main
37+
call-workflow-pypi-release:
38+
name: Publish production PyPI package (JFrog Artifactory)
39+
if: ${{ github.event_name == 'release' || github.event.inputs.publish-pypi == 'true' }}
40+
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-release_pypi_assets.yml@main
2541
with:
26-
package-manager: 'poetry'
2742
package-name: 'grid-apps'
28-
version-tag: ${{ github.ref_name }}
29-
python-version: '3.10'
30-
virtual-repo-names: '["geophysics-pypi-prod", "geology-pypi-prod"]'
43+
virtual-repo-names: '["geology-pypi-prod", "geophysics-pypi-prod"]'
44+
release-tag: ${{ github.event.release.tag_name || github.event.inputs.release-tag }}
3145
secrets:
3246
JFROG_ARTIFACTORY_URL: ${{ secrets.JFROG_ARTIFACTORY_URL }}
3347
JFROG_ARTIFACTORY_TOKEN: ${{ secrets.JFROG_ARTIFACTORY_TOKEN }}

0 commit comments

Comments
 (0)