feat: update version to 1.2.12 and refactor release workflows for improved provider detection and execution
This commit is contained in:
parent
8c88827a2d
commit
e0b8da079e
@ -112,3 +112,7 @@ EOF
|
|||||||
fi
|
fi
|
||||||
echo "Successfully uploaded $file"
|
echo "Successfully uploaded $file"
|
||||||
done
|
done
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
37
.github/workflows/release.yml
vendored
37
.github/workflows/release.yml
vendored
@ -11,19 +11,9 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
version: ${{ steps.get_version.outputs.VERSION }}
|
version: ${{ steps.get_version.outputs.VERSION }}
|
||||||
changelog: ${{ steps.changelog.outputs.CHANGES }}
|
changelog: ${{ steps.changelog.outputs.CHANGES }}
|
||||||
provider: ${{ steps.detect-provider.outputs.provider }}
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- 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
|
- name: Get version from tag
|
||||||
id: get_version
|
id: get_version
|
||||||
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
|
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
|
||||||
@ -33,9 +23,6 @@ jobs:
|
|||||||
PIO_VERSION=$(grep '^version = ' platformio.ini | cut -d'"' -f2)
|
PIO_VERSION=$(grep '^version = ' platformio.ini | cut -d'"' -f2)
|
||||||
TAG_VERSION=${{ steps.get_version.outputs.VERSION }}
|
TAG_VERSION=${{ steps.get_version.outputs.VERSION }}
|
||||||
|
|
||||||
echo "PlatformIO version: $PIO_VERSION"
|
|
||||||
echo "Tag version: $TAG_VERSION"
|
|
||||||
|
|
||||||
if [ "$PIO_VERSION" != "$TAG_VERSION" ]; then
|
if [ "$PIO_VERSION" != "$TAG_VERSION" ]; then
|
||||||
echo "Error: Version mismatch between tag ($TAG_VERSION) and platformio.ini ($PIO_VERSION)"
|
echo "Error: Version mismatch between tag ($TAG_VERSION) and platformio.ini ($PIO_VERSION)"
|
||||||
exit 1
|
exit 1
|
||||||
@ -49,19 +36,21 @@ jobs:
|
|||||||
echo "$CHANGELOG" >> $GITHUB_OUTPUT
|
echo "$CHANGELOG" >> $GITHUB_OUTPUT
|
||||||
echo "EOF" >> $GITHUB_OUTPUT
|
echo "EOF" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
github-release:
|
- name: Determine provider
|
||||||
needs: prepare
|
id: detect-provider
|
||||||
if: needs.prepare.outputs.provider == 'github'
|
run: |
|
||||||
uses: ./.github/workflows/providers/github-release.yml
|
if [[ "$GITHUB_SERVER_URL" == "https://github.com" ]]; then
|
||||||
with:
|
echo "provider=github" >> $GITHUB_OUTPUT
|
||||||
version: ${{ needs.prepare.outputs.version }}
|
else
|
||||||
changelog: ${{ needs.prepare.outputs.changelog }}
|
echo "provider=gitea" >> $GITHUB_OUTPUT
|
||||||
secrets: inherit
|
fi
|
||||||
|
|
||||||
gitea-release:
|
release:
|
||||||
needs: prepare
|
needs: prepare
|
||||||
if: needs.prepare.outputs.provider == 'gitea'
|
runs-on: ubuntu-latest
|
||||||
uses: ./.github/workflows/providers/gitea-release.yml
|
steps:
|
||||||
|
- name: Run provider workflow
|
||||||
|
uses: ./.github/workflows/providers/${{ needs.prepare.outputs.provider == 'github' && 'github' || 'gitea' }}-release.yml
|
||||||
with:
|
with:
|
||||||
version: ${{ needs.prepare.outputs.version }}
|
version: ${{ needs.prepare.outputs.version }}
|
||||||
changelog: ${{ needs.prepare.outputs.changelog }}
|
changelog: ${{ needs.prepare.outputs.changelog }}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
; https://docs.platformio.org/page/projectconf.html
|
; https://docs.platformio.org/page/projectconf.html
|
||||||
|
|
||||||
[common]
|
[common]
|
||||||
version = "1.2.11"
|
version = "1.2.12"
|
||||||
|
|
||||||
[env:esp32dev]
|
[env:esp32dev]
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
|
Loading…
x
Reference in New Issue
Block a user