-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: pSchlarb <p.schlarb@esatus.com>
- Loading branch information
1 parent
4122f91
commit f69a182
Showing
2 changed files
with
89 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,86 @@ | ||
name: "Publish Artifacts" | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
COMPONENT: | ||
description: "The component type. i.e. stable, rc, dev, main." | ||
required: true | ||
type: string | ||
UBUNTU_VERSION: | ||
required: true | ||
type: string | ||
distribution: | ||
required: true | ||
type: string | ||
moduleName: | ||
required: true | ||
type: string | ||
secrets: | ||
INDY_ARTIFACTORY_REPO_CONFIG: | ||
required: true | ||
PYPI_API_TOKEN: | ||
required: true | ||
|
||
|
||
jobs: | ||
publish_artifacts: | ||
name: Publish Artifacts | ||
runs-on: ubuntu-20.04 | ||
env: | ||
COMPONENT: ${{ inputs.COMPONENT }} | ||
UBUNTU_VERSION: ${{ inputs.UBUNTU_VERSION }} | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v1 | ||
|
||
- name: Setup JFrog CLI | ||
uses: jfrog/setup-jfrog-cli@v2 | ||
env: | ||
JF_ENV_1: ${{ secrets.INDY_ARTIFACTORY_REPO_CONFIG }} | ||
|
||
- name: Ping Artifactory | ||
run: | | ||
# Test the connection to Ping the Hyperledger Artifactory server | ||
# to ensure everything has been setup correctly. | ||
jfrog rt ping | ||
- name: Download Artifacts from Pipeline Artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ inputs.moduleName }}-deb | ||
path: to_publish | ||
|
||
- name: Publish Artifacts | ||
uses: hyperledger/indy-shared-gha/.github/actions/publish-deb@v1 | ||
with: | ||
sourceDirectory: ./to_publish | ||
distribution: ${{ inputs.distribution }} | ||
component: ${{ env.COMPONENT }} | ||
|
||
- name: Download Artifacts from Pipeline Artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: third-party-dependencies | ||
path: ./third-party-dependencies_to_publish | ||
|
||
- name: Publish 3rd Party Dependencies | ||
uses: hyperledger/indy-shared-gha/.github/actions/publish-deb@v1 | ||
with: | ||
sourceDirectory: ./third-party-dependencies_to_publish | ||
distribution: ${{ inputs.distribution }} | ||
component: ${{ env.COMPONENT }} | ||
|
||
- name: Download Python Packages from Pipeline Artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ inputs.moduleName }}-python | ||
path: dist | ||
|
||
- name: Publish Python Package to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
skip_existing: true | ||
name: "Publish Artifacts" | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
COMPONENT: | ||
description: "The component type. i.e. stable, rc, dev, main." | ||
required: true | ||
type: string | ||
UBUNTU_VERSION: | ||
required: true | ||
type: string | ||
distribution: | ||
required: true | ||
type: string | ||
moduleName: | ||
required: true | ||
type: string | ||
secrets: | ||
INDY_ARTIFACTORY_REPO_CONFIG: | ||
required: true | ||
PYPI_API_TOKEN: | ||
required: true | ||
|
||
|
||
jobs: | ||
publish_artifacts: | ||
name: Publish Artifacts | ||
runs-on: ubuntu-20.04 | ||
env: | ||
COMPONENT: ${{ inputs.COMPONENT }} | ||
UBUNTU_VERSION: ${{ inputs.UBUNTU_VERSION }} | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup JFrog CLI | ||
uses: jfrog/setup-jfrog-cli@v2 | ||
env: | ||
JF_ENV_1: ${{ secrets.INDY_ARTIFACTORY_REPO_CONFIG }} | ||
|
||
- name: Ping Artifactory | ||
run: | | ||
# Test the connection to Ping the Hyperledger Artifactory server | ||
# to ensure everything has been setup correctly. | ||
jfrog rt ping | ||
- name: Download Artifacts from Pipeline Artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ inputs.moduleName }}-deb | ||
path: to_publish | ||
|
||
- name: Publish Artifacts | ||
uses: hyperledger/indy-shared-gha/.github/actions/publish-deb@v1 | ||
with: | ||
sourceDirectory: ./to_publish | ||
distribution: ${{ inputs.distribution }} | ||
component: ${{ env.COMPONENT }} | ||
|
||
- name: Download Artifacts from Pipeline Artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: third-party-dependencies | ||
path: ./third-party-dependencies_to_publish | ||
|
||
- name: Publish 3rd Party Dependencies | ||
uses: hyperledger/indy-shared-gha/.github/actions/publish-deb@v1 | ||
with: | ||
sourceDirectory: ./third-party-dependencies_to_publish | ||
distribution: ${{ inputs.distribution }} | ||
component: ${{ env.COMPONENT }} | ||
|
||
- name: Download Python Packages from Pipeline Artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ inputs.moduleName }}-python | ||
path: dist | ||
|
||
- name: Publish Python Package to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
skip_existing: true | ||
|