Add release workflow
All checks were successful
Release Asset / Creality Ender 3 Pro - Release (push) Successful in 4m26s
Release Asset / FLSUN Kossel - Release (push) Successful in 1m15s
Continuous Integration / Creality Ender 3 Pro - Check (push) Successful in 4m20s
Continuous Integration / FLSUN Kossel - Check (push) Successful in 1m14s
All checks were successful
Release Asset / Creality Ender 3 Pro - Release (push) Successful in 4m26s
Release Asset / FLSUN Kossel - Release (push) Successful in 1m15s
Continuous Integration / Creality Ender 3 Pro - Check (push) Successful in 4m20s
Continuous Integration / FLSUN Kossel - Check (push) Successful in 1m14s
This commit is contained in:
parent
0bf5cb1c14
commit
b609ebafe1
@ -18,3 +18,4 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- run: python3 -m pip install platformio
|
- run: python3 -m pip install platformio
|
||||||
- run: ${{ gitea.workspace }}/build.sh ${{ gitea.workspace }}/Configs/FLSUN/Kossel/MakerBase\ MKS\ Gen\ L/printer.env
|
- run: ${{ gitea.workspace }}/build.sh ${{ gitea.workspace }}/Configs/FLSUN/Kossel/MakerBase\ MKS\ Gen\ L/printer.env
|
||||||
|
|
||||||
|
|||||||
31
.gitea/workflows/release.yaml
Normal file
31
.gitea/workflows/release.yaml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
name: Release Asset
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
creality-ender-3-pro-release:
|
||||||
|
name: Creality Ender 3 Pro - Release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- run: python3 -m pip install platformio
|
||||||
|
- run: ${{ gitea.workspace }}/build.sh ${{ gitea.workspace }}/Configs/Creality/Ender-3\ Pro/BigTreeTech\ SKR\ Mini\ E3\ 3.0/printer.env
|
||||||
|
- uses: akkuman/gitea-release-action@v1
|
||||||
|
with:
|
||||||
|
files: |-
|
||||||
|
output/**
|
||||||
|
|
||||||
|
flsun-kossel-release:
|
||||||
|
name: FLSUN Kossel - Release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- run: python3 -m pip install platformio
|
||||||
|
- run: ${{ gitea.workspace }}/build.sh ${{ gitea.workspace }}/Configs/FLSUN/Kossel/MakerBase\ MKS\ Gen\ L/printer.env
|
||||||
|
- uses: akkuman/gitea-release-action@v1
|
||||||
|
with:
|
||||||
|
files: |-
|
||||||
|
output/**
|
||||||
31
build.sh
31
build.sh
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
set -ueo pipefail
|
set -ueo pipefail
|
||||||
|
|
||||||
if (( $# != 1 )); then
|
if (( $# < 1 )); then
|
||||||
echo "Invalid CLI args."
|
echo "Invalid CLI args."
|
||||||
echo "Usage:"
|
echo "Usage:"
|
||||||
echo "./build.sh path/to/printer.env"
|
echo "./build.sh path/to/printer.env [-c]"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -15,33 +15,52 @@ if ! [ -f "$1" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if (( $# == 2 )); then
|
||||||
|
if [ $2 == "-c" ]; then
|
||||||
|
echo "Check mode- will not compile a binary!!!"
|
||||||
|
export TEST_MODE=1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
export TEST_MODE=0
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Printer env file found: $1"
|
echo "Printer env file found: $1"
|
||||||
|
|
||||||
echo -n "Loading config variables... "
|
echo -n "Loading config variables... "
|
||||||
source "$1"
|
source "$1"
|
||||||
echo "OK"
|
echo "OK"
|
||||||
|
|
||||||
|
if (( $TEST_MODE == 0 )); then
|
||||||
filename="fw-${name// /_}-${board// /_}-ver$config_version.$fw_ext"
|
filename="fw-${name// /_}-${board// /_}-ver$config_version.$fw_ext"
|
||||||
echo "Artifact name will be: ""$filename"""
|
echo "Artifact name will be: ""$filename"""
|
||||||
|
fi
|
||||||
|
|
||||||
if ! [ -d Marlin ]; then
|
if ! [ -d Marlin ]; then
|
||||||
git clone https://github.com/MarlinFirmware/Marlin --depth 1
|
git clone https://github.com/MarlinFirmware/Marlin --depth 1
|
||||||
cd Marlin
|
|
||||||
else
|
else
|
||||||
cd Marlin
|
cd Marlin
|
||||||
git pull
|
git fetch --all
|
||||||
|
git reset --hard origin/bugfix-2.1.x
|
||||||
|
cd ..
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n "Copying custom config files... "
|
echo -n "Copying custom config files... "
|
||||||
cp "$(dirname "$1")"/*.h Marlin/
|
cp "$(dirname "$1")"/*.h Marlin/Marlin/
|
||||||
echo "OK"
|
echo "OK"
|
||||||
|
|
||||||
|
cd Marlin
|
||||||
|
if (( $TEST_MODE == 0 )); then
|
||||||
echo "Running PlatformIO build!"
|
echo "Running PlatformIO build!"
|
||||||
pio run -e "$pio_env"
|
pio run -e "$pio_env"
|
||||||
echo -n "Finished building. Copying firmware."$fw_ext"... "
|
echo -n "Finished building. Copying firmware."$fw_ext"... "
|
||||||
mkdir -p ../output
|
mkdir -p ../output
|
||||||
cp .pio/build/"$pio_env"/firmware.$fw_ext ../output/"$filename"
|
cp .pio/build/"$pio_env"/firmware.$fw_ext ../output/"$filename"
|
||||||
echo "OK"
|
echo "OK"
|
||||||
cd ..
|
else
|
||||||
|
echo "Running PlatformIO checks!"
|
||||||
|
pio check -e "$pio_env"
|
||||||
|
echo -n "Finished checks."
|
||||||
|
fi
|
||||||
|
cd ../../
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user