Compare commits
No commits in common. "b0888e7e631447997eb0db7c30680f197fce7522" and "ab083f5f57229d27e0529cd037de978365824c02" have entirely different histories.
b0888e7e63
...
ab083f5f57
58
.github/workflows/github-release.yml
vendored
58
.github/workflows/github-release.yml
vendored
@ -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
|
|
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user