Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
519a089684 | |||
ef053bb2b6 | |||
0a91c7b269 | |||
875d9d2b70 | |||
52840b9b0b | |||
da1fc7678f |
57
.github/workflows/gitea-release.yml
vendored
57
.github/workflows/gitea-release.yml
vendored
@ -72,6 +72,11 @@ jobs:
|
|||||||
echo "EOF" >> $GITHUB_OUTPUT
|
echo "EOF" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Create Gitea Release
|
- name: Create Gitea Release
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
GITEA_API_URL: ${{ secrets.GITEA_API_URL }}
|
||||||
|
GITEA_REPO: ${{ secrets.GITEA_REPO }}
|
||||||
|
GITEA_OWNER: ${{ secrets.GITEA_OWNER }}
|
||||||
run: |
|
run: |
|
||||||
VERSION=${{ steps.get_version.outputs.VERSION }}
|
VERSION=${{ steps.get_version.outputs.VERSION }}
|
||||||
cd .pio/build/esp32dev
|
cd .pio/build/esp32dev
|
||||||
@ -84,6 +89,52 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Create release using git command
|
# Check if tag exists
|
||||||
git tag -a "v${VERSION}" -m "Release ${VERSION}"
|
if ! git rev-parse "v${VERSION}" >/dev/null 2>&1; then
|
||||||
git push origin "v${VERSION}"
|
# Create tag if it doesn't exist
|
||||||
|
git tag -a "v${VERSION}" -m "Release ${VERSION}"
|
||||||
|
git push origin "v${VERSION}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create Gitea release using API
|
||||||
|
RELEASE_DATA="{
|
||||||
|
\"tag_name\": \"v${VERSION}\",
|
||||||
|
\"name\": \"v${VERSION}\",
|
||||||
|
\"body\": \"${{ steps.changelog.outputs.CHANGES }}\"
|
||||||
|
}"
|
||||||
|
|
||||||
|
# Create release and capture HTTP status
|
||||||
|
RESPONSE=$(curl -s -w "%{http_code}" -X POST \
|
||||||
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "$RELEASE_DATA" \
|
||||||
|
"${GITEA_API_URL}/api/v1/repos/${GITEA_OWNER}/${GITEA_REPO}/releases")
|
||||||
|
|
||||||
|
HTTP_STATUS=${RESPONSE: -3}
|
||||||
|
RESPONSE_BODY=${RESPONSE:0:-3}
|
||||||
|
|
||||||
|
if [ "$HTTP_STATUS" != "201" ]; then
|
||||||
|
echo "Fehler beim Erstellen des Releases: $RESPONSE_BODY"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Extract release ID from response
|
||||||
|
RELEASE_ID=$(echo "$RESPONSE_BODY" | jq -r .id)
|
||||||
|
|
||||||
|
# Upload assets
|
||||||
|
for file in upgrade_filaman_firmware_v${VERSION}.bin upgrade_filaman_website_v${VERSION}.bin filaman_full_${VERSION}.bin; do
|
||||||
|
if [ -f "$file" ]; then
|
||||||
|
echo "Uploading $file..."
|
||||||
|
UPLOAD_RESPONSE=$(curl -s -w "%{http_code}" -X POST \
|
||||||
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
|
-H "Content-Type: application/octet-stream" \
|
||||||
|
--data-binary @"$file" \
|
||||||
|
"${GITEA_API_URL}/api/v1/repos/${GITEA_OWNER}/${GITEA_REPO}/releases/${RELEASE_ID}/assets?name=${file}")
|
||||||
|
|
||||||
|
UPLOAD_STATUS=${UPLOAD_RESPONSE: -3}
|
||||||
|
if [ "$UPLOAD_STATUS" != "201" ]; then
|
||||||
|
echo "Fehler beim Upload von $file"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
14
CHANGELOG.md
14
CHANGELOG.md
@ -1,5 +1,19 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [1.3.22] - 2025-02-21
|
||||||
|
### Added
|
||||||
|
- workflow: improve Gitea release process with additional environment variables and error handling
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- update webpages for version v1.3.22
|
||||||
|
|
||||||
|
|
||||||
|
## [1.3.21] - 2025-02-21
|
||||||
|
### Changed
|
||||||
|
- update webpages for version v1.3.21
|
||||||
|
- workflow: enhance Gitea release process with API integration and token management
|
||||||
|
|
||||||
|
|
||||||
## [1.3.20] - 2025-02-21
|
## [1.3.20] - 2025-02-21
|
||||||
### Changed
|
### Changed
|
||||||
- update webpages for version v1.3.20
|
- update webpages for version v1.3.20
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
; https://docs.platformio.org/page/projectconf.html
|
; https://docs.platformio.org/page/projectconf.html
|
||||||
|
|
||||||
[common]
|
[common]
|
||||||
version = "1.3.20"
|
version = "1.3.22"
|
||||||
|
|
||||||
#test
|
#test
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user