Compare commits

...

14 Commits

Author SHA1 Message Date
fadb122d28 docs: update changelog for version 1.2.35
Some checks failed
Release Workflow / route (push) Successful in 20s
Release Workflow / verify-provider (push) Successful in 3s
Release Workflow / github-release (push) Has been skipped
Release Workflow / gitea-release (push) Failing after 18s
2025-02-19 11:18:07 +01:00
4347f89c16 feat: update Gitea release workflow and version to 1.2.35 2025-02-19 11:18:05 +01:00
9856757e49 docs: update changelog for version 1.2.34
All checks were successful
Release Workflow / route (push) Successful in 12s
Release Workflow / verify-provider (push) Successful in 4s
Release Workflow / github-release (push) Has been skipped
Release Workflow / gitea-release (push) Has been skipped
2025-02-19 11:01:57 +01:00
afb7b5f42b feat: update version to 1.2.34 and enhance Gitea and GitHub release workflows 2025-02-19 11:01:54 +01:00
ba8506247b docs: update changelog for version 1.2.33
All checks were successful
Release Workflow / route (push) Successful in 12s
Release Workflow / verify-provider (push) Successful in 8s
Release Workflow / github-release (push) Has been skipped
Release Workflow / gitea-release (push) Has been skipped
2025-02-19 11:00:03 +01:00
61f3f90d6d feat: update version to 1.2.33 and refactor release workflows for Gitea and GitHub 2025-02-19 11:00:01 +01:00
a143527dd0 docs: update changelog for version 1.2.32
Some checks failed
Release Workflow / route (push) Successful in 7s
Release Workflow / verify-provider (push) Successful in 3s
Release Workflow / github-release (push) Has been skipped
Release Workflow / gitea-release (push) Failing after 2m24s
2025-02-19 10:58:53 +01:00
f2c9818e61 feat: update version to 1.2.32 and adjust workflow dependencies for GitHub and Gitea releases 2025-02-19 10:58:51 +01:00
9e23af29ff docs: update changelog for version 1.2.31
All checks were successful
Release Workflow / route (push) Successful in 7s
Release Workflow / verify-provider (push) Successful in 3s
Release Workflow / github-release (push) Has been skipped
Release Workflow / gitea-release (push) Has been skipped
2025-02-19 10:58:06 +01:00
095885442a feat: update version to 1.2.31 2025-02-19 10:58:04 +01:00
359c9b5a6d docs: update changelog for version 1.2.30
All checks were successful
Release Workflow / route (push) Successful in 6s
Release Workflow / verify-provider (push) Successful in 3s
Release Workflow / github-release (push) Has been skipped
Release Workflow / gitea-release (push) Has been skipped
2025-02-19 10:50:09 +01:00
b16a7a4c17 feat: update version to 1.2.30 and enhance release workflows for Gitea and GitHub with improved artifact handling and changelog integration 2025-02-19 10:50:06 +01:00
b4ea175757 docs: update changelog for version 1.2.29
All checks were successful
Release Workflow / route (push) Successful in 7s
Release Workflow / verify-provider (push) Successful in 3s
Release Workflow / github-release (push) Has been skipped
Release Workflow / gitea-release (push) Successful in 2m26s
2025-02-19 10:37:44 +01:00
ca4671a7dd feat: update version to 1.2.29 and enhance Gitea release workflow with improved error handling and debugging 2025-02-19 10:37:41 +01:00
11 changed files with 188 additions and 87 deletions

View File

@ -4,86 +4,111 @@ on:
workflow_call:
jobs:
build:
uses: ./.github/workflows/providers/build.yml
create-release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: firmware
path: firmware
- name: Checkout Repository
uses: actions/checkout@v4
- name: Create Gitea Release
- name: Install Build Dependencies
run: |
# System-Level Dependencies
echo "Installing system dependencies..."
sudo apt-get update
sudo apt-get install -y python3-minimal python3-pip curl
# Verify Python installation
echo "Python version:"
python3 --version
# Verify pip installation
echo "Pip version:"
pip3 --version
# Install Python packages
echo "Installing Python packages..."
python3 -m pip install --user platformio
python3 -m pip install --user esptool
# Add local bin to PATH
echo "${HOME}/.local/bin" >> $GITHUB_PATH
export PATH="${HOME}/.local/bin:$PATH"
# Verify installations
echo "PlatformIO version:"
pio --version || echo "PlatformIO not found in PATH"
echo "Esptool version:"
esptool.py version || echo "Esptool not found in PATH"
- name: Build Firmware
run: |
# Ensure PlatformIO is in PATH
export PATH="${HOME}/.local/bin:$PATH"
echo "Building SPIFFS..."
python3 -m platformio run -t buildfs
echo "Building firmware..."
python3 -m platformio run
- name: Merge Firmware Files
run: |
export PATH="${HOME}/.local/bin:$PATH"
python3 -m esptool --chip esp32 merge_bin \
--flash_mode dio \
--flash_freq 40m \
--flash_size 4MB \
-o .pio/build/esp32dev/filaman_full.bin \
0x1000 .pio/build/esp32dev/bootloader.bin \
0x8000 .pio/build/esp32dev/partitions.bin \
0x10000 .pio/build/esp32dev/firmware.bin \
0x290000 .pio/build/esp32dev/spiffs.bin
cp .pio/build/esp32dev/firmware.bin .pio/build/esp32dev/filaman_ota.bin
- name: Create Release
shell: bash
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: |
# Determine API URL if not set
API_URL="${GITEA_API_URL:-${GITEA_SERVER_URL}/api/v1}"
# Basis-Variablen setzen
API_BASE="${GITEA_SERVER_URL}/api/v1"
REPO="${GITEA_REPOSITORY}"
TAG="${GITEA_REF_NAME}"
if [ -z "$API_URL" ] || [ -z "$REPO" ] || [ -z "$TAG" ]; then
echo "Error: Required Gitea environment variables are not set"
env
exit 1
fi
echo "Creating release for ${TAG}..."
# Escape changelog content for JSON
CHANGELOG_ESCAPED=$(echo '${{ needs.build.outputs.changelog }}' | jq -sR .)
echo "Creating release for tag: $TAG"
echo "Using API URL: $API_URL"
echo "Repository: $REPO"
# Create release using Gitea API
RELEASE_DATA=$(cat <<EOF
{
"tag_name": "$TAG",
"name": "Release ${{ needs.build.outputs.version }}",
"body": ${CHANGELOG_ESCAPED}
}
EOF
)
echo "Release data:"
echo "$RELEASE_DATA" | jq '.'
# Create the release
RELEASE_ID=$(curl -X POST \
# Release erstellen
RESPONSE=$(curl -k -f -s \
-X POST \
-H "accept: application/json" \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d "$RELEASE_DATA" \
"${API_URL}/repos/${REPO}/releases" \
| tee /dev/stderr \
| jq -r '.id')
-d "{\"tag_name\":\"${TAG}\",\"name\":\"Release ${TAG}\"}" \
"${API_BASE}/repos/${REPO}/releases")
if [ -z "$RELEASE_ID" ] || [ "$RELEASE_ID" = "null" ]; then
echo "Failed to create release"
exit 1
fi
# Release ID extrahieren
RELEASE_ID=$(echo "$RESPONSE" | grep -o '"id":[0-9]*' | cut -d':' -f2)
echo "Created release with ID: $RELEASE_ID"
# Upload the binary files
for file in "filaman_full.bin" "filaman_ota.bin"; do
echo "Uploading $file..."
RESPONSE=$(curl -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"firmware/$file" \
"${API_URL}/repos/${REPO}/releases/${RELEASE_ID}/assets?name=$file")
if [ -n "$RELEASE_ID" ]; then
echo "Release created with ID: $RELEASE_ID"
if echo "$RESPONSE" | jq -e '.id' > /dev/null; then
echo "Successfully uploaded $file"
else
echo "Failed to upload $file"
echo "Response: $RESPONSE"
exit 1
fi
done
# Binärdateien hochladen
for file in "filaman_full.bin" "filaman_ota.bin"; do
echo "Uploading $file..."
curl -k -f -s \
-X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/octet-stream" \
--data-binary "@.pio/build/esp32dev/$file" \
"${API_BASE}/repos/${REPO}/releases/${RELEASE_ID}/assets?name=$file"
done
echo "Upload completed"
else
echo "Failed to create release"
echo "$RESPONSE"
exit 1
fi

View File

@ -4,27 +4,68 @@ on:
workflow_call:
jobs:
build:
uses: ./.github/workflows/providers/build.yml
create-release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
name: firmware
path: firmware
python-version: '3.x'
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Build Firmware
run: |
pio run -t buildfs # Build SPIFFS
pio run # Build firmware
- name: Install esptool
run: |
pip install esptool
- name: Merge firmware and SPIFFS
run: |
esptool.py --chip esp32 merge_bin \
--flash_mode dio \
--flash_freq 40m \
--flash_size 4MB \
-o .pio/build/esp32dev/filaman_full.bin \
0x1000 .pio/build/esp32dev/bootloader.bin \
0x8000 .pio/build/esp32dev/partitions.bin \
0x10000 .pio/build/esp32dev/firmware.bin \
0x290000 .pio/build/esp32dev/spiffs.bin
- name: Prepare OTA firmware
run: |
cp .pio/build/esp32dev/firmware.bin .pio/build/esp32dev/filaman_ota.bin
- name: Get version from tag
id: get_version
run: |
echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Read CHANGELOG.md
id: changelog
run: |
VERSION=${{ steps.get_version.outputs.VERSION }}
CHANGELOG=$(awk "/## \\[$VERSION\\]/{p=1;print;next} /## \\[/{p=0} p" CHANGELOG.md)
echo "CHANGES<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "${{ github.ref_name }}" \
--title "Release ${{ needs.build.outputs.version }}" \
--notes "${{ needs.build.outputs.changelog }}" \
firmware/filaman_full.bin \
firmware/filaman_ota.bin
--title "Release ${{ steps.get_version.outputs.VERSION }}" \
--notes "${{ steps.changelog.outputs.CHANGES }}" \
.pio/build/esp32dev/filaman_full.bin \
.pio/build/esp32dev/filaman_ota.bin

View File

@ -1,5 +1,40 @@
# Changelog
## [1.2.35] - 2025-02-19
### Added
- update Gitea release workflow and version to 1.2.35
## [1.2.34] - 2025-02-19
### Added
- update version to 1.2.34 and enhance Gitea and GitHub release workflows
## [1.2.33] - 2025-02-19
### Added
- update version to 1.2.33 and refactor release workflows for Gitea and GitHub
## [1.2.32] - 2025-02-19
### Added
- update version to 1.2.32 and adjust workflow dependencies for GitHub and Gitea releases
## [1.2.31] - 2025-02-19
### Added
- update version to 1.2.31
## [1.2.30] - 2025-02-19
### Added
- update version to 1.2.30 and enhance release workflows for Gitea and GitHub with improved artifact handling and changelog integration
## [1.2.29] - 2025-02-19
### Added
- update version to 1.2.29 and enhance Gitea release workflow with improved error handling and debugging
## [1.2.28] - 2025-02-19
### Added
- add build and release workflows for Gitea and GitHub, increment version to 1.2.28

View File

@ -12,7 +12,7 @@
<div style="display: flex; align-items: center; gap: 2rem;">
<img src="/logo.png" alt="FilaMan Logo" class="logo">
<div class="logo-text">
<h1>FilaMan<span class="version">v1.2.4</span></h1>
<h1>FilaMan<span class="version">v1.2.29</span></h1>
<h4>Filament Management Tool</h4>
</div>
</div>

View File

@ -12,7 +12,7 @@
<div style="display: flex; align-items: center; gap: 2rem;">
<img src="/logo.png" alt="FilaMan Logo" class="logo">
<div class="logo-text">
<h1>FilaMan<span class="version">v1.2.4</span></h1>
<h1>FilaMan<span class="version">v1.2.29</span></h1>
<h4>Filament Management Tool</h4>
</div>
</div>

View File

@ -12,7 +12,7 @@
<div style="display: flex; align-items: center; gap: 2rem;">
<img src="/logo.png" alt="FilaMan Logo" class="logo">
<div class="logo-text">
<h1>FilaMan<span class="version">v1.2.4</span></h1>
<h1>FilaMan<span class="version">v1.2.29</span></h1>
<h4>Filament Management Tool</h4>
</div>
</div>

View File

@ -12,7 +12,7 @@
<div style="display: flex; align-items: center; gap: 2rem;">
<img src="/logo.png" alt="FilaMan Logo" class="logo">
<div class="logo-text">
<h1>FilaMan<span class="version">v1.2.4</span></h1>
<h1>FilaMan<span class="version">v1.2.29</span></h1>
<h4>Filament Management Tool</h4>
</div>
</div>

View File

@ -12,7 +12,7 @@
<div style="display: flex; align-items: center; gap: 2rem;">
<img src="/logo.png" alt="FilaMan Logo" class="logo">
<div class="logo-text">
<h1>FilaMan<span class="version">v1.2.4</span></h1>
<h1>FilaMan<span class="version">v1.2.29</span></h1>
<h4>Filament Management Tool</h4>
</div>
</div>

View File

@ -12,7 +12,7 @@
<div style="display: flex; align-items: center; gap: 2rem;">
<img src="/logo.png" alt="FilaMan Logo" class="logo">
<div class="logo-text">
<h1>FilaMan<span class="version">v1.2.4</span></h1>
<h1>FilaMan<span class="version">v1.2.29</span></h1>
<h4>Filament Management Tool</h4>
</div>
</div>

View File

@ -12,7 +12,7 @@
<div style="display: flex; align-items: center; gap: 2rem;">
<img src="/logo.png" alt="FilaMan Logo" class="logo">
<div class="logo-text">
<h1>FilaMan<span class="version">v1.2.4</span></h1>
<h1>FilaMan<span class="version">v1.2.29</span></h1>
<h4>Filament Management Tool</h4>
</div>
</div>

View File

@ -9,7 +9,7 @@
; https://docs.platformio.org/page/projectconf.html
[common]
version = "1.2.28"
version = "1.2.35"
[env:esp32dev]
platform = espressif32