Compare commits

..

No commits in common. "c2bd0982ab38bf736cb96e075e98f939166110fe" and "8c88827a2da89d87f0c8433a9ecc00b609115af5" have entirely different histories.

4 changed files with 31 additions and 29 deletions

View File

@ -112,7 +112,3 @@ EOF
fi
echo "Successfully uploaded $file"
done
}
}
}
}

View File

@ -11,9 +11,19 @@ jobs:
outputs:
version: ${{ steps.get_version.outputs.VERSION }}
changelog: ${{ steps.changelog.outputs.CHANGES }}
provider: ${{ steps.detect-provider.outputs.provider }}
steps:
- uses: actions/checkout@v4
- name: Detect provider
id: detect-provider
run: |
if [[ "$GITHUB_SERVER_URL" == "https://github.com" ]]; then
echo "provider=github" >> $GITHUB_OUTPUT
else
echo "provider=gitea" >> $GITHUB_OUTPUT
fi
- name: Get version from tag
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
@ -23,6 +33,9 @@ jobs:
PIO_VERSION=$(grep '^version = ' platformio.ini | cut -d'"' -f2)
TAG_VERSION=${{ steps.get_version.outputs.VERSION }}
echo "PlatformIO version: $PIO_VERSION"
echo "Tag version: $TAG_VERSION"
if [ "$PIO_VERSION" != "$TAG_VERSION" ]; then
echo "Error: Version mismatch between tag ($TAG_VERSION) and platformio.ini ($PIO_VERSION)"
exit 1
@ -36,21 +49,19 @@ jobs:
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Determine provider
id: detect-provider
run: |
if [[ "$GITHUB_SERVER_URL" == "https://github.com" ]]; then
echo "provider=github" >> $GITHUB_OUTPUT
else
echo "provider=gitea" >> $GITHUB_OUTPUT
fi
release:
github-release:
needs: prepare
runs-on: ubuntu-latest
steps:
- name: Run provider workflow
uses: ./.github/workflows/providers/${{ needs.prepare.outputs.provider == 'github' && 'github' || 'gitea' }}-release.yml
if: needs.prepare.outputs.provider == 'github'
uses: ./.github/workflows/providers/github-release.yml
with:
version: ${{ needs.prepare.outputs.version }}
changelog: ${{ needs.prepare.outputs.changelog }}
secrets: inherit
gitea-release:
needs: prepare
if: needs.prepare.outputs.provider == 'gitea'
uses: ./.github/workflows/providers/gitea-release.yml
with:
version: ${{ needs.prepare.outputs.version }}
changelog: ${{ needs.prepare.outputs.changelog }}

View File

@ -1,10 +1,5 @@
# Changelog
## [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

View File

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