Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
875d9d2b70 | |||
52840b9b0b | |||
da1fc7678f | |||
982bb5aa21 | |||
007737db13 | |||
17e5949201 | |||
6a57186091 | |||
babd3f47a0 | |||
5372fe10fe | |||
e0c9d90892 | |||
e5f5d1961b | |||
31a960fb9e | |||
3c2e75b77a |
38
.github/workflows/gitea-release.yml
vendored
38
.github/workflows/gitea-release.yml
vendored
@ -72,6 +72,9 @@ 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 }}
|
||||||
run: |
|
run: |
|
||||||
VERSION=${{ steps.get_version.outputs.VERSION }}
|
VERSION=${{ steps.get_version.outputs.VERSION }}
|
||||||
cd .pio/build/esp32dev
|
cd .pio/build/esp32dev
|
||||||
@ -84,6 +87,35 @@ 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
|
||||||
|
RESPONSE=$(curl -X POST \
|
||||||
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "$RELEASE_DATA" \
|
||||||
|
"${GITEA_API_URL}/repos/owner/repo/releases")
|
||||||
|
|
||||||
|
# Upload assets
|
||||||
|
RELEASE_ID=$(echo $RESPONSE | jq -r .id)
|
||||||
|
for file in upgrade_filaman_firmware_v${VERSION}.bin upgrade_filaman_website_v${VERSION}.bin filaman_full_${VERSION}.bin; do
|
||||||
|
if [ -f "$file" ]; then
|
||||||
|
curl -X POST \
|
||||||
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
|
-H "Content-Type: application/octet-stream" \
|
||||||
|
--data-binary @"$file" \
|
||||||
|
"${GITEA_API_URL}/repos/owner/repo/releases/${RELEASE_ID}/assets?name=${file}"
|
||||||
|
fi
|
||||||
|
done
|
33
CHANGELOG.md
33
CHANGELOG.md
@ -1,5 +1,38 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [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
|
||||||
|
### Changed
|
||||||
|
- update webpages for version v1.3.20
|
||||||
|
- workflow: enable git tagging and pushing for Gitea releases
|
||||||
|
|
||||||
|
|
||||||
|
## [1.3.19] - 2025-02-21
|
||||||
|
### Changed
|
||||||
|
- update webpages for version v1.3.19
|
||||||
|
- workflow: enable git push for version tagging in Gitea release
|
||||||
|
|
||||||
|
|
||||||
|
## [1.3.18] - 2025-02-21
|
||||||
|
### Changed
|
||||||
|
- ACHTUNG: Installiere einmal das filaman_full.bin danach kannst du über die upgrade Files aktualisieren und deine Settings bleiben auch erhalten.
|
||||||
|
- ATTENTION: Install the filaman_full.bin once, then you can update via the upgrade files and your settings will also be retained.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [1.3.18] - 2025-02-21
|
||||||
|
### Added
|
||||||
|
- add note about filaman_full.bin installation in changelog
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- update webpages for version v1.3.18
|
||||||
|
- update changelog for version 1.3.18 and enhance update script for existing entries
|
||||||
|
|
||||||
## [1.3.17] - 2025-02-21
|
## [1.3.17] - 2025-02-21
|
||||||
### Changed
|
### Changed
|
||||||
- update webpages for version v1.3.17
|
- update webpages for version v1.3.17
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
; https://docs.platformio.org/page/projectconf.html
|
; https://docs.platformio.org/page/projectconf.html
|
||||||
|
|
||||||
[common]
|
[common]
|
||||||
version = "1.3.17"
|
version = "1.3.21"
|
||||||
|
|
||||||
#test
|
#test
|
||||||
|
|
||||||
|
@ -122,7 +122,29 @@ def update_changelog():
|
|||||||
f.write(updated_content)
|
f.write(updated_content)
|
||||||
push_changes(version)
|
push_changes(version)
|
||||||
else:
|
else:
|
||||||
print(f"Version {version} already exists in changelog")
|
# Version existiert bereits, füge neue Einträge unter der existierenden Version ein
|
||||||
|
version_pattern = f"## \\[{version}\\] - \\d{{4}}-\\d{{2}}-\\d{{2}}"
|
||||||
|
next_version_pattern = "## \\[.*?\\] - \\d{4}-\\d{2}-\\d{2}"
|
||||||
|
|
||||||
|
# Finde den Start der aktuellen Version
|
||||||
|
version_match = re.search(version_pattern, content)
|
||||||
|
if version_match:
|
||||||
|
version_start = version_match.end()
|
||||||
|
# Suche nach der nächsten Version
|
||||||
|
next_version_match = re.search(next_version_pattern, content[version_start:])
|
||||||
|
|
||||||
|
if next_version_match:
|
||||||
|
# Füge zwischen aktueller und nächster Version ein
|
||||||
|
insert_pos = version_start + next_version_match.start()
|
||||||
|
updated_content = content[:insert_pos] + "\n" + changelog_entry + content[insert_pos:]
|
||||||
|
else:
|
||||||
|
# Füge am Ende des Abschnitts ein
|
||||||
|
updated_content = content[:version_start] + "\n" + changelog_entry + content[version_start:]
|
||||||
|
|
||||||
|
with open(changelog_path, 'w') as f:
|
||||||
|
f.write(updated_content)
|
||||||
|
push_changes(version)
|
||||||
|
print(f"Added new entries to existing version {version}")
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
update_changelog()
|
update_changelog()
|
Reference in New Issue
Block a user