mirror of
https://github.com/XRPLF/rippled.git
synced 2026-01-15 20:25:26 +00:00
Compare commits
2 Commits
develop
...
bthomee/up
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
857a4eea9a | ||
|
|
24177fdca0 |
21
.github/actions/extract-version/action.yml
vendored
Normal file
21
.github/actions/extract-version/action.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: Extract version
|
||||
description: "Extract version from BuildInfo.cpp"
|
||||
|
||||
outputs:
|
||||
version:
|
||||
description: "The version extracted from BuildInfo.cpp."
|
||||
value: ${{ steps.version.outputs.version }}
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Extract version
|
||||
id: version
|
||||
shell: bash
|
||||
run: |
|
||||
VERSION="$(cat src/libxrpl/protocol/BuildInfo.cpp | grep "versionString =" | awk -F '"' '{print $2}')"
|
||||
if [[ -z "${VERSION}" ]]; then
|
||||
echo 'Unable to extract version from BuildInfo.cpp.'
|
||||
exit 1
|
||||
fi
|
||||
echo "version=${VERSION}" >> "${GITHUB_OUTPUT}"
|
||||
72
.github/actions/upload-recipe/action.yml
vendored
Normal file
72
.github/actions/upload-recipe/action.yml
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
name: Upload Conan recipe
|
||||
description: "Upload recipe to a Conan remote."
|
||||
|
||||
inputs:
|
||||
conan_recipe_name:
|
||||
description: "The name of the recipe to use."
|
||||
required: false
|
||||
default: xrpl
|
||||
conan_recipe_version:
|
||||
description: "The version of the recipe to use."
|
||||
required: true
|
||||
conan_recipe_channel:
|
||||
description: "The optional Conan channel to use."
|
||||
required: false
|
||||
conan_recipe_user:
|
||||
description: "The optional Conan user to use."
|
||||
required: false
|
||||
conan_remote_name:
|
||||
description: "The name of the Conan remote to use."
|
||||
required: true
|
||||
conan_remote_url:
|
||||
description: "The URL of the Conan endpoint to use."
|
||||
required: true
|
||||
conan_remote_username:
|
||||
description: "The username for logging into the Conan remote."
|
||||
required: true
|
||||
conan_remote_password:
|
||||
description: "The password for logging into the Conan remote."
|
||||
required: true
|
||||
|
||||
outputs:
|
||||
conan_ref: ${{ steps.ref.outputs.ref }}
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
|
||||
steps:
|
||||
- name: Calculate Conan reference
|
||||
id: ref
|
||||
shell: bash
|
||||
env:
|
||||
CONAN_RECIPE_NAME: ${{ inputs.conan_recipe_name }}
|
||||
CONAN_RECIPE_VERSION: ${{ inputs.conan_recipe_version }}
|
||||
CONAN_RECIPE_CHANNEL: ${{ inputs.conan_recipe_channel }}
|
||||
CONAN_RECIPE_USER: ${{ inputs.conan_recipe_user }}
|
||||
run: |
|
||||
if [[ -n "${CONAN_RECIPE_USER}" && -n "${CONAN_RECIPE_CHANNEL}" ]]; then
|
||||
echo "ref=${CONAN_RECIPE_NAME}/${CONAN_RECIPE_VERSION}@${CONAN_RECIPE_USER}/${CONAN_RECIPE_CHANNEL}" >> "${GITHUB_OUTPUT}"
|
||||
else
|
||||
echo "ref=${CONAN_RECIPE_NAME}/${CONAN_RECIPE_VERSION}" >> "${GITHUB_OUTPUT}"
|
||||
fi
|
||||
- name: Set up Conan
|
||||
uses: ./.github/actions/setup-conan
|
||||
with:
|
||||
conan_remote_name: ${{ inputs.conan_remote_name }}
|
||||
conan_remote_url: ${{ inputs.conan_remote_url }}
|
||||
- name: Log into Conan remote
|
||||
shell: bash
|
||||
env:
|
||||
CONAN_REMOTE_NAME: ${{ inputs.conan_remote_name }}
|
||||
CONAN_REMOTE_USERNAME: ${{ inputs.conan_remote_username }}
|
||||
CONAN_REMOTE_PASSWORD: ${{ inputs.conan_remote_password }}
|
||||
run: conan remote login "${CONAN_REMOTE_NAME}" "${CONAN_REMOTE_USERNAME}" --password "${CONAN_REMOTE_PASSWORD}"
|
||||
- name: Upload package
|
||||
shell: bash
|
||||
env:
|
||||
CONAN_RECIPE_CHANNEL: ${{ inputs.conan_recipe_channel }}
|
||||
CONAN_RECIPE_USER: ${{ inputs.conan_recipe_user }}
|
||||
CONAN_REMOTE_NAME: ${{ inputs.conan_remote_name }}
|
||||
run: |
|
||||
conan export --channel="${CONAN_RECIPE_CHANNEL}" --user="${CONAN_RECIPE_USER}" .
|
||||
conan upload --confirm --check --remote="${CONAN_REMOTE_NAME}" ${{ steps.ref.outputs.ref }}
|
||||
32
.github/workflows/reusable-notify-clio.yml
vendored
32
.github/workflows/reusable-notify-clio.yml
vendored
@@ -44,37 +44,29 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||
- name: Extract version
|
||||
id: version
|
||||
uses: ./.github/actions/extract-version
|
||||
- name: Generate outputs
|
||||
id: generate
|
||||
env:
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
run: |
|
||||
echo 'Generating user and channel.'
|
||||
echo "user=clio" >> "${GITHUB_OUTPUT}"
|
||||
echo "channel=pr_${PR_NUMBER}" >> "${GITHUB_OUTPUT}"
|
||||
echo 'Extracting version.'
|
||||
echo "version=$(cat src/libxrpl/protocol/BuildInfo.cpp | grep "versionString =" | awk -F '"' '{print $2}')" >> "${GITHUB_OUTPUT}"
|
||||
- name: Calculate conan reference
|
||||
id: conan_ref
|
||||
run: |
|
||||
echo "conan_ref=${{ steps.generate.outputs.version }}@${{ steps.generate.outputs.user }}/${{ steps.generate.outputs.channel }}" >> "${GITHUB_OUTPUT}"
|
||||
- name: Set up Conan
|
||||
uses: ./.github/actions/setup-conan
|
||||
- name: Upload recipe
|
||||
uses: ./.github/actions/upload-recipe
|
||||
id: upload
|
||||
with:
|
||||
conan_recipe_version: ${{ steps.version.outputs.version }}
|
||||
conan_recipe_channel: ${{ steps.generate.outputs.channel }}
|
||||
conan_recipe_user: ${{ steps.generate.outputs.user }}
|
||||
conan_remote_name: ${{ inputs.conan_remote_name }}
|
||||
conan_remote_url: ${{ inputs.conan_remote_url }}
|
||||
- name: Log into Conan remote
|
||||
env:
|
||||
CONAN_REMOTE_NAME: ${{ inputs.conan_remote_name }}
|
||||
run: conan remote login "${CONAN_REMOTE_NAME}" "${{ secrets.conan_remote_username }}" --password "${{ secrets.conan_remote_password }}"
|
||||
- name: Upload package
|
||||
env:
|
||||
CONAN_REMOTE_NAME: ${{ inputs.conan_remote_name }}
|
||||
run: |
|
||||
conan export --user=${{ steps.generate.outputs.user }} --channel=${{ steps.generate.outputs.channel }} .
|
||||
conan upload --confirm --check --remote="${CONAN_REMOTE_NAME}" xrpl/${{ steps.conan_ref.outputs.conan_ref }}
|
||||
conan_remote_username: ${{ secrets.conan_remote_username }}
|
||||
conan_remote_password: ${{ secrets.conan_remote_password }}
|
||||
outputs:
|
||||
conan_ref: ${{ steps.conan_ref.outputs.conan_ref }}
|
||||
conan_ref: ${{ steps.upload.outputs.conan_ref }}
|
||||
|
||||
notify:
|
||||
needs: upload
|
||||
|
||||
Reference in New Issue
Block a user