sync to artifactory #14
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
name: sync to artifactory | |
description: download package from conan center and upload it and dpendency to jfrog artifactory | |
on: | |
workflow_dispatch: | |
inputs: | |
package: | |
description: 'package name' | |
required: true | |
version: | |
description: 'package version' | |
required: true | |
repository: | |
description: 'Choose Artifactory repository' | |
required: false | |
type: choice | |
options: | |
- production | |
- testing | |
default: 'testing' | |
jobs: | |
sync-conan-package: | |
runs-on: ubuntu-latest | |
env: | |
CONAN_REVISIONS_ENABLED: 1 | |
PACKAGE_REF: ${{ github.event.inputs.package }}/${{ github.event.inputs.version }}@ | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
- name: Install Conan | |
run: | | |
pip install --user conan==1.65.0 | |
conan --version | |
- name: Configure Conan remote | |
run: | | |
if [ "${{ github.event.inputs.repository }}" = "production" ]; then | |
conan remote add artifactory https://milvus01.jfrog.io/artifactory/api/conan/default-conan-local | |
else | |
# for testing purpose | |
conan remote add artifactory https://milvus01.jfrog.io/artifactory/api/conan/testing | |
fi | |
# List remote Conan repositories; should include Conan Center by default | |
conan remote list | |
- name: Install package | |
run: | | |
conan install $PACKAGE_REF \ | |
-s compiler=gcc \ | |
-s compiler.version=11 \ | |
-s compiler.libcxx=libstdc++11 \ | |
-s build_type=Release | |
- name: inspect installed package | |
run: | | |
# Search for installed packages and their revisions | |
conan search '*' --revisions | |
- name: Upload | |
run: | | |
conan user -p ${{ secrets.JFROG_PASSWORD }} -r artifactory ${{ secrets.JFROG_USERNAME }} | |
# upload all packages | |
# Upload only the Conan recipe to the specified local repository, excluding binaries | |
conan upload '*' -r artifactory -c |