Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
5d39f04786 | |||
d955e26b82 | |||
c20e7de5c3 | |||
55c3b3688a | |||
fea5932125 | |||
04f557939d | |||
58549a53e4 | |||
64a46e3e7d | |||
c2bd0982ab | |||
e0b8da079e |
20
.github/workflows/providers/gitea-release.yml
vendored
20
.github/workflows/providers/gitea-release.yml
vendored
@ -11,15 +11,13 @@ on:
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: write # Required for creating releases
|
||||
issues: read # Required for reading changelog
|
||||
pull-requests: read # Required for reading changelog
|
||||
contents: write
|
||||
issues: read
|
||||
pull-requests: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@ -74,21 +72,13 @@ jobs:
|
||||
fi
|
||||
|
||||
echo "Creating Gitea release..."
|
||||
release_data="{\"tag_name\":\"${{ github.ref_name }}\",\"name\":\"Release ${{ inputs.version }}\",\"body\":${{ toJSON(inputs.changelog) }},\"draft\":false,\"prerelease\":false}"
|
||||
RESPONSE=$(curl -sS -X POST \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Accept: application/json" \
|
||||
"${GITEA_API_URL}/repos/${GITEA_REPOSITORY}/releases" \
|
||||
-d @- << EOF
|
||||
{
|
||||
"tag_name": "${{ github.ref_name }}",
|
||||
"name": "Release ${{ inputs.version }}",
|
||||
"body": ${{ toJSON(inputs.changelog) }},
|
||||
"draft": false,
|
||||
"prerelease": false
|
||||
}
|
||||
EOF
|
||||
)
|
||||
-d "$release_data")
|
||||
|
||||
# Extract and validate release ID
|
||||
RELEASE_ID=$(echo "$RESPONSE" | jq -r .id)
|
||||
|
12
.github/workflows/providers/github-release.yml
vendored
12
.github/workflows/providers/github-release.yml
vendored
@ -11,15 +11,11 @@ on:
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: write # Required for creating releases
|
||||
issues: read # Required for reading changelog
|
||||
pull-requests: read # Required for reading changelog
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write # Required for creating releases at job level
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@ -35,8 +31,8 @@ jobs:
|
||||
|
||||
- name: Build Firmware
|
||||
run: |
|
||||
pio run -t buildfs # Build SPIFFS
|
||||
pio run # Build firmware
|
||||
pio run -t buildfs
|
||||
pio run
|
||||
|
||||
- name: Merge firmware and SPIFFS
|
||||
run: |
|
||||
@ -53,7 +49,7 @@ jobs:
|
||||
- name: Prepare OTA firmware
|
||||
run: cp .pio/build/esp32dev/firmware.bin .pio/build/esp32dev/filaman_ota.bin
|
||||
|
||||
- name: Create Release
|
||||
- name: Create GitHub Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
|
31
.github/workflows/release.yml
vendored
31
.github/workflows/release.yml
vendored
@ -6,24 +6,14 @@ on:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
get-version-and-changelog:
|
||||
runs-on: ubuntu-latest
|
||||
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
|
||||
@ -33,9 +23,6 @@ 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
|
||||
@ -50,19 +37,19 @@ jobs:
|
||||
echo "EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
github-release:
|
||||
needs: prepare
|
||||
if: needs.prepare.outputs.provider == 'github'
|
||||
needs: get-version-and-changelog
|
||||
if: github.server_url == 'https://github.com'
|
||||
uses: ./.github/workflows/providers/github-release.yml
|
||||
with:
|
||||
version: ${{ needs.prepare.outputs.version }}
|
||||
changelog: ${{ needs.prepare.outputs.changelog }}
|
||||
version: ${{ needs.get-version-and-changelog.outputs.version }}
|
||||
changelog: ${{ needs.get-version-and-changelog.outputs.changelog }}
|
||||
secrets: inherit
|
||||
|
||||
gitea-release:
|
||||
needs: prepare
|
||||
if: needs.prepare.outputs.provider == 'gitea'
|
||||
needs: get-version-and-changelog
|
||||
if: github.server_url != 'https://github.com'
|
||||
uses: ./.github/workflows/providers/gitea-release.yml
|
||||
with:
|
||||
version: ${{ needs.prepare.outputs.version }}
|
||||
changelog: ${{ needs.prepare.outputs.changelog }}
|
||||
version: ${{ needs.get-version-and-changelog.outputs.version }}
|
||||
changelog: ${{ needs.get-version-and-changelog.outputs.changelog }}
|
||||
secrets: inherit
|
25
CHANGELOG.md
25
CHANGELOG.md
@ -1,5 +1,30 @@
|
||||
# Changelog
|
||||
|
||||
## [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
|
||||
|
@ -9,7 +9,7 @@
|
||||
; https://docs.platformio.org/page/projectconf.html
|
||||
|
||||
[common]
|
||||
version = "1.2.11"
|
||||
version = "1.2.16"
|
||||
|
||||
[env:esp32dev]
|
||||
platform = espressif32
|
||||
|
Reference in New Issue
Block a user