This commit is contained in:
@@ -49,8 +49,31 @@ jobs:
|
||||
run: |
|
||||
make BUILD_TYPE=$BUILD_TYPE PREFIX=$PREFIX VERSION=$VERSION
|
||||
|
||||
- name: Upload hex
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: firmware-${{ env.BUILD_TYPE }}
|
||||
path: build/**/*.hex
|
||||
|
||||
- name: Publish HEX to binaries repo
|
||||
run: |
|
||||
git config --global user.name "gitea-runner"
|
||||
git config --global user.email "runner@runner.runner"
|
||||
|
||||
# clone binaries repo
|
||||
git clone https://gitea.swiss-dedi.ch/Lukas/Flextron-Binaries.git bins
|
||||
|
||||
# decide target folder
|
||||
if [ "$BUILD_TYPE" = "dev" ]; then
|
||||
TARGET_DIR="bins/dev"
|
||||
else
|
||||
TARGET_DIR="bins/live"
|
||||
fi
|
||||
|
||||
mkdir -p "$TARGET_DIR"
|
||||
|
||||
# copy newest hex
|
||||
cp $(find build -name "*.hex" | head -n 1) \
|
||||
"$TARGET_DIR/${PREFIX}_${VERSION}.hex"
|
||||
|
||||
cd bins
|
||||
|
||||
git add .
|
||||
git commit -m "CI build $BUILD_TYPE $VERSION" || echo "No changes"
|
||||
|
||||
git push
|
||||
Reference in New Issue
Block a user