Compare commits

..

No commits in common. "b0888e7e631447997eb0db7c30680f197fce7522" and "ab083f5f57229d27e0529cd037de978365824c02" have entirely different histories.

3 changed files with 32 additions and 34 deletions

View File

@ -17,8 +17,6 @@ jobs:
contents: write contents: write
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v4 uses: actions/setup-python@v4
@ -106,34 +104,40 @@ jobs:
- name: Create GitHub Release - name: Create GitHub Release
env: env:
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }} GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
run: | run: |
VERSION=${{ steps.get_version.outputs.VERSION }} VERSION=${{ steps.get_version.outputs.VERSION }}
cd .pio/build/esp32dev cd .pio/build/esp32dev
# Create release with available files # Create the release first
FILES_TO_UPLOAD="" RELEASE_JSON=$(curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/$GITHUB_REPOSITORY/releases" \
-d "{
\"tag_name\":\"v${VERSION}\",
\"name\":\"Release ${VERSION}\",
\"body\":\"${{ steps.changelog.outputs.CHANGES }}\",
\"draft\":false,
\"prerelease\":false
}")
# Always add firmware # Extract the upload URL from the response
if [ -f "filaman_${VERSION}.bin" ]; then UPLOAD_URL=$(echo "$RELEASE_JSON" | jq -r .upload_url | sed 's/{?name,label}//')
FILES_TO_UPLOAD="$FILES_TO_UPLOAD filaman_${VERSION}.bin"
# Upload the binary files
for file in filaman_${VERSION}.bin webpage_${VERSION}.bin filaman_full_${VERSION}.bin; do
if [ -f "$file" ]; then
echo "Uploading $file..."
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H "Content-Type: application/octet-stream" \
"${UPLOAD_URL}?name=${file}" \
--data-binary "@${file}"
fi fi
done
# Add SPIFFS and full binary only if they exist
if [ -f "webpage_${VERSION}.bin" ]; then
FILES_TO_UPLOAD="$FILES_TO_UPLOAD webpage_${VERSION}.bin"
fi
if [ -f "filaman_full_${VERSION}.bin" ]; then
FILES_TO_UPLOAD="$FILES_TO_UPLOAD filaman_full_${VERSION}.bin"
fi
# Create release with available files
if [ -n "$FILES_TO_UPLOAD" ]; then
gh release create "v${VERSION}" \
--title "Release ${VERSION}" \
--notes "${{ steps.changelog.outputs.CHANGES }}" \
$FILES_TO_UPLOAD
else
echo "Error: No files found to upload"
exit 1

View File

@ -1,11 +1,5 @@
# Changelog # Changelog
## [1.3.14] - 2025-02-21
### Changed
- update webpages for version v1.3.14
- ci: update GitHub release workflow to improve file upload handling
## [1.3.13] - 2025-02-21 ## [1.3.13] - 2025-02-21
### Changed ### Changed
- update webpages for version v1.3.13 - update webpages for version v1.3.13

View File

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