Compare commits
No commits in common. "069ec2d7a1579f032b34d222c89540b1f499a6a4" and "bb166aa29fe39fbf4e4f7ac7c35933789488ecf5" have entirely different histories.
069ec2d7a1
...
bb166aa29f
70
.github/workflows/github-release.yml
vendored
70
.github/workflows/github-release.yml
vendored
@ -2,19 +2,12 @@ name: GitHub Release
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
secrets:
|
|
||||||
GITHUB_TOKEN:
|
|
||||||
description: 'GitHub token for release creation'
|
|
||||||
required: true
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
create-release:
|
create-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
#permissions:
|
||||||
contents: write
|
# contents: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
@ -104,40 +97,35 @@ jobs:
|
|||||||
|
|
||||||
- name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
run: |
|
run: |
|
||||||
VERSION=${{ steps.get_version.outputs.VERSION }}
|
VERSION=${{ steps.get_version.outputs.VERSION }}
|
||||||
|
|
||||||
|
# Create release with available files
|
||||||
cd .pio/build/esp32dev
|
cd .pio/build/esp32dev
|
||||||
|
FILES_TO_UPLOAD=""
|
||||||
|
|
||||||
# Create the release first
|
# Always add firmware
|
||||||
RELEASE_JSON=$(curl -L \
|
if [ -f "filaman_${VERSION}.bin" ]; then
|
||||||
-X POST \
|
FILES_TO_UPLOAD="$FILES_TO_UPLOAD filaman_${VERSION}.bin"
|
||||||
-H "Accept: application/vnd.github+json" \
|
fi
|
||||||
-H "Authorization: Bearer $GITHUB_TOKEN" \
|
|
||||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
# Add SPIFFS and full binary only if they exist
|
||||||
"https://api.github.com/repos/$GITHUB_REPOSITORY/releases" \
|
if [ -f "webpage_${VERSION}.bin" ]; then
|
||||||
-d "{
|
FILES_TO_UPLOAD="$FILES_TO_UPLOAD webpage_${VERSION}.bin"
|
||||||
\"tag_name\":\"v${VERSION}\",
|
fi
|
||||||
\"name\":\"Release ${VERSION}\",
|
|
||||||
\"body\":\"${{ steps.changelog.outputs.CHANGES }}\",
|
if [ -f "filaman_full_${VERSION}.bin" ]; then
|
||||||
\"draft\":false,
|
FILES_TO_UPLOAD="$FILES_TO_UPLOAD filaman_full_${VERSION}.bin"
|
||||||
\"prerelease\":false
|
fi
|
||||||
}")
|
|
||||||
|
# Create release with available files
|
||||||
# Extract the upload URL from the response
|
if [ -n "$FILES_TO_UPLOAD" ]; then
|
||||||
UPLOAD_URL=$(echo "$RELEASE_JSON" | jq -r .upload_url | sed 's/{?name,label}//')
|
gh release create "v${VERSION}" \
|
||||||
|
--title "Release ${VERSION}" \
|
||||||
# Upload the binary files
|
--notes "${{ steps.changelog.outputs.CHANGES }}" \
|
||||||
for file in filaman_${VERSION}.bin webpage_${VERSION}.bin filaman_full_${VERSION}.bin; do
|
$FILES_TO_UPLOAD
|
||||||
if [ -f "$file" ]; then
|
else
|
||||||
echo "Uploading $file..."
|
echo "Error: No files found to upload"
|
||||||
curl -L \
|
exit 1
|
||||||
-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
|
|
7
.github/workflows/release.yml
vendored
7
.github/workflows/release.yml
vendored
@ -5,9 +5,6 @@ on:
|
|||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- 'v*'
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
detect-provider:
|
detect-provider:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -26,12 +23,8 @@ jobs:
|
|||||||
|
|
||||||
github-release:
|
github-release:
|
||||||
needs: detect-provider
|
needs: detect-provider
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
if: needs.detect-provider.outputs.provider == 'github'
|
if: needs.detect-provider.outputs.provider == 'github'
|
||||||
uses: ./.github/workflows/github-release.yml
|
uses: ./.github/workflows/github-release.yml
|
||||||
secrets:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
gitea-release:
|
gitea-release:
|
||||||
needs: detect-provider
|
needs: detect-provider
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## [1.3.12] - 2025-02-21
|
|
||||||
### Changed
|
|
||||||
- update webpages for version v1.3.12
|
|
||||||
- ci: enhance GitHub release workflow with token handling and file upload improvements
|
|
||||||
|
|
||||||
|
|
||||||
## [1.3.11] - 2025-02-21
|
## [1.3.11] - 2025-02-21
|
||||||
### Changed
|
### Changed
|
||||||
- update webpages for version v1.3.11
|
- update webpages for version v1.3.11
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
; https://docs.platformio.org/page/projectconf.html
|
; https://docs.platformio.org/page/projectconf.html
|
||||||
|
|
||||||
[common]
|
[common]
|
||||||
version = "1.3.12"
|
version = "1.3.11"
|
||||||
|
|
||||||
[env:esp32dev]
|
[env:esp32dev]
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
|
Loading…
x
Reference in New Issue
Block a user