Compare commits

..

25 Commits

Author SHA1 Message Date
e2449030c5 docs: update changelog for version 1.2.20
Some checks failed
Release / prepare (push) Has been cancelled
2025-02-19 01:21:23 +01:00
5a91e87afa feat: update release workflows for GitHub and Gitea, increment version to 1.2.20 2025-02-19 01:21:14 +01:00
5e66c3bd45 docs: update changelog for version 1.2.19
Some checks failed
Release / prepare (push) Has been cancelled
Release / github (push) Has been cancelled
Release / gitea (push) Has been cancelled
2025-02-19 01:19:46 +01:00
61c82f796f feat: add Gitea and GitHub release workflows for version 1.2.19 2025-02-19 01:19:42 +01:00
7661e0eb20 docs: update changelog for version 1.2.18
Some checks failed
Release / release (push) Has been cancelled
2025-02-19 01:18:00 +01:00
c06e6de89a feat: remove Gitea and GitHub release workflows and increment version to 1.2.18 2025-02-19 01:17:56 +01:00
262bed84df docs: update changelog for version 1.2.17
Some checks failed
Release / prepare (push) Has been cancelled
Release / github (push) Has been cancelled
Release / gitea (push) Has been cancelled
2025-02-19 01:03:56 +01:00
c710e5d7f8 feat: update Gitea release workflow for version 1.2.17 and improve job structure 2025-02-19 01:03:53 +01:00
5d39f04786 docs: update changelog for version 1.2.16
Some checks failed
Release / github-release (push) Has been cancelled
Release / gitea-release (push) Has been cancelled
Release / get-version-and-changelog (push) Has been cancelled
2025-02-19 00:49:39 +01:00
d955e26b82 feat: update Gitea release workflow and increment version to 1.2.16 2025-02-19 00:49:35 +01:00
c20e7de5c3 docs: update changelog for version 1.2.15
Some checks failed
Release / get-version-and-changelog (push) Successful in 7s
Release / github-release (push) Has been skipped
Release / gitea-release (push) Failing after 2s
2025-02-19 00:46:38 +01:00
55c3b3688a feat: update version to 1.2.15 and clean up Gitea release workflow 2025-02-19 00:46:34 +01:00
fea5932125 docs: update changelog for version 1.2.14
Some checks failed
Release / get-version-and-changelog (push) Successful in 8s
Release / github-release (push) Has been skipped
Release / gitea-release (push) Failing after 3s
2025-02-19 00:43:18 +01:00
04f557939d feat: update version to 1.2.14 and refactor release workflows for improved GitHub and Gitea support 2025-02-19 00:43:15 +01:00
58549a53e4 docs: update changelog for version 1.2.13 2025-02-19 00:32:43 +01:00
64a46e3e7d feat: update version to 1.2.13 and enhance release workflow with Python setup and Gitea support 2025-02-19 00:32:40 +01:00
c2bd0982ab docs: update changelog for version 1.2.12
Some checks failed
Release / prepare (push) Successful in 8s
Release / release (push) Failing after 0s
2025-02-19 00:26:45 +01:00
e0b8da079e feat: update version to 1.2.12 and refactor release workflows for improved provider detection and execution 2025-02-19 00:26:40 +01:00
8c88827a2d docs: update changelog for version 1.2.11
Some checks failed
Release / prepare (push) Successful in 8s
Release / github-release (push) Has been skipped
Release / gitea-release (push) Failing after 3s
2025-02-18 23:50:00 +01:00
6128bc2827 feat: update version to 1.2.11 and enhance GitHub and Gitea release workflows with input validation and improved error handling 2025-02-18 23:49:57 +01:00
6d21a8ec52 docs: update changelog for version 1.2.10 2025-02-18 23:31:16 +01:00
2ee4eca7dd feat: enhance Gitea release workflow with API connection verification and URL validation; update version to 1.2.10 2025-02-18 23:31:00 +01:00
9eb64e06f0 docs: update changelog for version 1.2.9
Some checks failed
Release / release (push) Failing after 2m37s
2025-02-18 23:20:06 +01:00
693ef4e26c feat: update version to 1.2.9 in platformio.ini 2025-02-18 23:20:03 +01:00
11c099eba2 feat: refactor GitHub and Gitea release workflows for improved version handling and firmware uploads 2025-02-18 23:14:52 +01:00
6 changed files with 182 additions and 158 deletions

View File

@ -1,101 +1,63 @@
name: Gitea Release name: Gitea Release
on: on:
workflow_call: # This workflow will only be triggered when called by another workflow workflow_call:
inputs:
permissions: version:
contents: write # Required for creating releases type: string
issues: read # Required for reading changelog required: true
pull-requests: read # Required for reading changelog changelog:
type: string
required: true
jobs: jobs:
build: release:
runs-on: ubuntu-latest runs-on: gitea-runner
permissions:
contents: write
steps: steps:
- uses: actions/checkout@v4 - name: Debug Info
run: |
- name: Set up Python echo "Version: ${{ inputs.version }}"
uses: actions/setup-python@v4 echo "Changelog: ${{ inputs.changelog }}"
with: echo "Tag: ${GITHUB_REF#refs/tags/}"
python-version: '3.x'
- uses: actions/checkout@v4
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Build Firmware
run: |
pio run -t buildfs # Build SPIFFS
pio run # Build firmware
- name: Install esptool
run: |
pip install esptool
- name: Merge firmware and SPIFFS
run: |
esptool.py --chip esp32 merge_bin \
--flash_mode dio \
--flash_freq 40m \
--flash_size 4MB \
-o .pio/build/esp32dev/filaman_full.bin \
0x1000 .pio/build/esp32dev/bootloader.bin \
0x8000 .pio/build/esp32dev/partitions.bin \
0x10000 .pio/build/esp32dev/firmware.bin \
0x290000 .pio/build/esp32dev/spiffs.bin
- name: Prepare OTA firmware
run: |
cp .pio/build/esp32dev/firmware.bin .pio/build/esp32dev/filaman_ota.bin
- name: Get version from tag
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Read CHANGELOG.md - name: Set up Python
id: changelog uses: actions/setup-python@v4
run: | with:
CHANGELOG=$(awk "/## \\[${{ steps.get_version.outputs.VERSION }}\\]/{p=1;print;next} /## \\[/{p=0} p" CHANGELOG.md) python-version: '3.x'
echo "CHANGES<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT - name: Install dependencies
echo "EOF" >> $GITHUB_OUTPUT run: |
python -m pip install --upgrade pip
- name: Create Release pip install platformio esptool
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} - name: Build
GITEA_API_URL: ${{ secrets.GITEA_API_URL }} run: |
GITEA_REPOSITORY: ${{ secrets.GITEA_REPOSITORY }} pio run -t buildfs
run: | pio run
# Create release using Gitea API
RESPONSE=$(curl -X POST \ - name: Create full firmware
-H "Authorization: token ${GITEA_TOKEN}" \ run: |
-H "Content-Type: application/json" \ esptool.py --chip esp32 merge_bin \
-H "accept: application/json" \ --flash_mode dio \
"${GITEA_API_URL}/repos/${GITEA_REPOSITORY}/releases" \ --flash_freq 40m \
-d '{ --flash_size 4MB \
"tag_name": "${{ github.ref_name }}", -o .pio/build/esp32dev/filaman_full.bin \
"name": "Release ${{ steps.get_version.outputs.VERSION }}", 0x1000 .pio/build/esp32dev/bootloader.bin \
"body": "${{ steps.changelog.outputs.CHANGES }}", 0x8000 .pio/build/esp32dev/partitions.bin \
"draft": false, 0x10000 .pio/build/esp32dev/firmware.bin \
"prerelease": false 0x290000 .pio/build/esp32dev/spiffs.bin
}') cp .pio/build/esp32dev/firmware.bin .pio/build/esp32dev/filaman_ota.bin
# Extract release ID from response - name: Create Release
RELEASE_ID=$(echo $RESPONSE | jq -r .id) run: |
TAG="${GITHUB_REF#refs/tags/}"
# Upload full firmware curl -X POST "${GITEA_API_URL}/repos/${GITEA_REPOSITORY}/releases" \
curl -X POST \ -H "Authorization: token ${GITEA_TOKEN}" \
-H "Authorization: token ${GITEA_TOKEN}" \ -H "Content-Type: application/json" \
-H "Content-Type: application/octet-stream" \ -d "{\"tag_name\":\"$TAG\",\"name\":\"Release ${{ inputs.version }}\",\"body\":\"${{ inputs.changelog }}\",\"draft\":false,\"prerelease\":false}"
"${GITEA_API_URL}/repos/${GITEA_REPOSITORY}/releases/${RELEASE_ID}/assets?name=filaman_full.bin" \ env:
--data-binary @.pio/build/esp32dev/filaman_full.bin GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
GITEA_API_URL: ${{ secrets.GITEA_API_URL }}
# Upload OTA firmware GITEA_REPOSITORY: ${{ secrets.GITEA_REPOSITORY }}
curl -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/octet-stream" \
"${GITEA_API_URL}/repos/${GITEA_REPOSITORY}/releases/${RELEASE_ID}/assets?name=filaman_ota.bin" \
--data-binary @.pio/build/esp32dev/filaman_ota.bin

View File

@ -1,20 +1,21 @@
name: GitHub Release name: GitHub Release
on: on:
push: workflow_call:
tags: inputs:
- 'v*' version:
required: true
type: string
changelog:
required: true
type: string
permissions: permissions:
contents: write # Required for creating releases contents: write
issues: read # Required for reading changelog
pull-requests: read # Required for reading changelog
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
contents: write # Required for creating releases at job level
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@ -23,19 +24,15 @@ jobs:
with: with:
python-version: '3.x' python-version: '3.x'
- name: Install PlatformIO - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install --upgrade platformio pip install --upgrade platformio esptool
- name: Build Firmware - name: Build Firmware
run: | run: |
pio run -t buildfs # Build SPIFFS pio run -t buildfs
pio run # Build firmware pio run
- name: Install esptool
run: |
pip install esptool
- name: Merge firmware and SPIFFS - name: Merge firmware and SPIFFS
run: | run: |
@ -50,36 +47,14 @@ jobs:
0x290000 .pio/build/esp32dev/spiffs.bin 0x290000 .pio/build/esp32dev/spiffs.bin
- name: Prepare OTA firmware - name: Prepare OTA firmware
run: | run: cp .pio/build/esp32dev/firmware.bin .pio/build/esp32dev/filaman_ota.bin
# Use PlatformIO to create a proper OTA image
cp .pio/build/esp32dev/firmware.bin .pio/build/esp32dev/filaman_ota.bin
- name: Get version from tag - name: Create GitHub Release
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Read CHANGELOG.md
id: changelog
run: |
CHANGELOG=$(awk "/## \\[${{ steps.get_version.outputs.VERSION }}\\]/{p=1;print;next} /## \\[/{p=0} p" CHANGELOG.md)
echo "CHANGES<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Install and Configure GitHub CLI
run: |
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& sudo apt update \
&& sudo apt install gh -y
- name: Create Release with GitHub CLI
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
gh release create "${{ github.ref_name }}" \ gh release create "${{ github.ref_name }}" \
--title "Release ${{ steps.get_version.outputs.VERSION }}" \ --title "Release ${{ inputs.version }}" \
--notes "${{ steps.changelog.outputs.CHANGES }}" \ --notes "${{ inputs.changelog }}" \
".pio/build/esp32dev/filaman_full.bin#filaman_full.bin" \ ".pio/build/esp32dev/filaman_full.bin#filaman_full.bin" \
".pio/build/esp32dev/filaman_ota.bin#filaman_ota.bin" ".pio/build/esp32dev/filaman_ota.bin#filaman_ota.bin"

View File

@ -6,28 +6,36 @@ on:
- 'v*' - 'v*'
jobs: jobs:
detect: prepare:
runs-on: ubuntu-latest runs-on: gitea-runner
outputs: outputs:
platform: ${{ steps.platform.outputs.platform }} version: ${{ steps.version.outputs.version }}
changelog: ${{ steps.changelog.outputs.changelog }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Determine hosting platform - name: Get version from tag
id: platform id: version
run: | run: |
if [[ "$GITHUB_SERVER_URL" == "https://github.com" ]]; then VERSION=${GITHUB_REF#refs/tags/v}
echo "platform=github" >> $GITHUB_OUTPUT echo "version=$VERSION" >> $GITHUB_OUTPUT
else
echo "platform=gitea" >> $GITHUB_OUTPUT - name: Get changelog
fi id: changelog
run: |
gitea-release: echo "$CHANGELOG" >> $GITHUB_OUTPUT
needs: detect echo "EOF" >> $GITHUB_OUTPUT
if: needs.detect.outputs.platform == 'gitea'
uses: ./.github/workflows/providers/gitea-release.yml - name: Run GitHub Release
if: github.server_url == 'https://github.com'
github-release: uses: ./.github/workflows/providers/github-release.yml
needs: detect with:
if: needs.detect.outputs.platform == 'github' version: ${{ steps.version.outputs.version }}
uses: ./.github/workflows/providers/github-release.yml changelog: ${{ steps.changelog.outputs.changelog }}
- name: Run Gitea Release
if: github.server_url != 'https://github.com'
uses: ./.github/workflows/providers/gitea-release.yml
with:
version: ${{ steps.version.outputs.version }}
changelog: ${{ steps.changelog.outputs.changelog }}

View File

@ -1,5 +1,66 @@
# Changelog # Changelog
## [1.2.20] - 2025-02-19
### Added
- update release workflows for GitHub and Gitea, increment version to 1.2.20
## [1.2.19] - 2025-02-19
### Added
- add Gitea and GitHub release workflows for version 1.2.19
## [1.2.18] - 2025-02-19
### Added
- remove Gitea and GitHub release workflows and increment version to 1.2.18
## [1.2.17] - 2025-02-19
### Added
- update Gitea release workflow for version 1.2.17 and improve job structure
## [1.2.16] - 2025-02-19
### Added
- update Gitea release workflow and increment version to 1.2.16
## [1.2.15] - 2025-02-19
### Added
- update version to 1.2.15 and clean up Gitea release workflow
## [1.2.14] - 2025-02-19
### Added
- update version to 1.2.14 and refactor release workflows for improved GitHub and Gitea support
## [1.2.13] - 2025-02-19
### Added
- update version to 1.2.13 and enhance release workflow with Python setup and Gitea support
## [1.2.12] - 2025-02-19
### Added
- update version to 1.2.12 and refactor release workflows for improved provider detection and execution
## [1.2.11] - 2025-02-18
### Added
- update version to 1.2.11 and enhance GitHub and Gitea release workflows with input validation and improved error handling
## [1.2.10] - 2025-02-18
### Added
- enhance Gitea release workflow with API connection verification and URL validation; update version to 1.2.10
## [1.2.9] - 2025-02-18
### Added
- update version to 1.2.9 in platformio.ini
- refactor GitHub and Gitea release workflows for improved version handling and firmware uploads
## [1.2.8] - 2025-02-18 ## [1.2.8] - 2025-02-18
### Added ### Added
- update version to 1.2.8 in platformio.ini; refactor Gitea and GitHub release workflows - update version to 1.2.8 in platformio.ini; refactor Gitea and GitHub release workflows

View File

@ -124,6 +124,24 @@ german explanatory video: [Youtube](https://youtu.be/uNDe2wh9SS8?si=b-jYx4I1w62z
- Configure WiFi settings through the captive portal. - Configure WiFi settings through the captive portal.
- Access the web interface at `http://filaman.local` or the IP address. - Access the web interface at `http://filaman.local` or the IP address.
## GitHub Actions Configuration
### Required Secrets for Gitea Releases
When using Gitea as your repository host, you need to configure the following secrets in your repository:
- `GITEA_API_URL`: The base URL of your Gitea instance, including protocol (e.g., `https://git.example.com`)
- `GITEA_TOKEN`: Your Gitea access token with permissions to create releases
- `GITEA_REPOSITORY`: The repository name in format `owner/repo` (e.g., `username/filaman`)
Example values:
```
GITEA_API_URL=https://git.example.com
GITEA_TOKEN=abcdef1234567890
GITEA_REPOSITORY=username/filaman
```
Make sure to set these secrets in your repository settings under Settings > Secrets and Variables > Actions.
## Documentation ## Documentation

View File

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