Skip to content

Commit

Permalink
.github: add support for pushing releases to artifactory
Browse files Browse the repository at this point in the history
  • Loading branch information
bugobliterator committed Feb 5, 2025
1 parent 5ac6523 commit e895f7e
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ jobs:
env:
HERE3_CUBEID_TAG: v1.10
HERE4_CUBEID_TAG: v1.10
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }}

steps:
- name: Install dependencies
run: |
Expand Down Expand Up @@ -151,3 +155,43 @@ jobs:
asset_name: GNSSPeriph.zip
asset_path: GNSSPeriph.zip
asset_content_type: application/zip

- name: Setup JFrog CLI
if: github.event_name == 'release'
run: |
curl -fL https://install-cli.jfrog.io | sh
jf config add --url="${ARTIFACTORY_URL}" --user="${ARTIFACTORY_USER}" --password="${ARTIFACTORY_TOKEN}" --interactive=false
- name: Upload to JFrog Artifactory
if: github.event_name == 'release'
run: |
# Extract version without 'v' prefix
VERSION=${GITHUB_REF_NAME#v}
# Create version-specific paths for each board
for BOARD in here3plus here4 herepro hereproalpha; do
jf rt mkdir "gnss-periph/${GITHUB_REF_NAME}/${BOARD}"
done
# Upload Here3+ artifacts
jf rt upload "release/Here3Plus_FW.bin" "gnss-periph/${GITHUB_REF_NAME}/here3plus/Here3Plus_FW_${VERSION}.bin"
jf rt upload "release/Here3Plus_FW_with_bl.hex" "gnss-periph/${GITHUB_REF_NAME}/here3plus/Here3Plus_FW_with_bl_${VERSION}.hex"
jf rt upload "release/Here3Plus_FW.elf" "gnss-periph/${GITHUB_REF_NAME}/here3plus/Here3Plus_FW_${VERSION}.elf"
jf rt upload "release/Here3+_FW.apj" "gnss-periph/${GITHUB_REF_NAME}/here3plus/Here3Plus_FW_${VERSION}.apj"
# Upload Here4 artifacts
jf rt upload "release/Here4_FW.bin" "gnss-periph/${GITHUB_REF_NAME}/here4/Here4_FW_${VERSION}.bin"
jf rt upload "release/Here4_FW_with_bl.hex" "gnss-periph/${GITHUB_REF_NAME}/here4/Here4_FW_with_bl_${VERSION}.hex"
jf rt upload "release/Here4_FW.elf" "gnss-periph/${GITHUB_REF_NAME}/here4/Here4_FW_${VERSION}.elf"
jf rt upload "release/Here4_FW.apj" "gnss-periph/${GITHUB_REF_NAME}/here4/Here4_FW_${VERSION}.apj"
# Upload HerePro artifacts
jf rt upload "release/HerePro_FW.bin" "gnss-periph/${GITHUB_REF_NAME}/herepro/HerePro_FW_${VERSION}.bin"
jf rt upload "release/HerePro_FW_with_bl.hex" "gnss-periph/${GITHUB_REF_NAME}/herepro/HerePro_FW_with_bl_${VERSION}.hex"
jf rt upload "release/HerePro_FW.elf" "gnss-periph/${GITHUB_REF_NAME}/herepro/HerePro_FW_${VERSION}.elf"
jf rt upload "release/HerePro_FW.apj" "gnss-periph/${GITHUB_REF_NAME}/herepro/HerePro_FW_${VERSION}.apj"
# Upload HereProAlpha artifacts
jf rt upload "release/HereProAlpha_FW.bin" "gnss-periph/${GITHUB_REF_NAME}/hereproalpha/HereProAlpha_FW_${VERSION}.bin"
jf rt upload "release/HereProAlpha_FW.elf" "gnss-periph/${GITHUB_REF_NAME}/hereproalpha/HereProAlpha_FW_${VERSION}.elf"
jf rt upload "release/HereProAlpha_FW.apj" "gnss-periph/${GITHUB_REF_NAME}/hereproalpha/HereProAlpha_FW_${VERSION}.apj"

0 comments on commit e895f7e

Please sign in to comment.