fix workflow

This commit is contained in:
d4rks1d33 committed 2026-05-08 14:49:18 +00:00
1 parent c92b1db8b7
commit 91e9a4cbac
1 file changed
+18 -9
+18 -9
View File
@@ -8,6 +8,10 @@ on:
permissions:
contents: write
concurrency:
group: release
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
@@ -18,12 +22,13 @@ jobs:
with:
fetch-depth: 0
- name: Get latest tag
- name: Get latest semantic version tag
id: version
shell: bash
run: |
git fetch --tags
LAST_TAG=$(git tag --sort=-v:refname | head -n 1)
LAST_TAG=$(git tag --sort=-v:refname | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)
if [ -z "$LAST_TAG" ]; then
NEW_TAG="1.0.0"
@@ -35,14 +40,13 @@ jobs:
NEW_TAG="$MAJOR.$MINOR.$PATCH"
fi
echo "Latest tag: $LAST_TAG"
echo "New tag: $NEW_TAG"
echo "NEW_TAG=$NEW_TAG" >> $GITHUB_OUTPUT
- name: Create tag
run: |
git tag ${{ steps.version.outputs.NEW_TAG }}
git push origin ${{ steps.version.outputs.NEW_TAG }}
- name: Build firmware
shell: bash
run: |
export DIST_SUFFIX=Flipper-ARF
chmod +x fbt
@@ -50,6 +54,7 @@ jobs:
- name: Detect firmware updater
id: firmware
shell: bash
run: |
DIR=$(ls -d dist/f7-* | head -n 1)
FILE="$DIR/flipper-z-f7-update-Flipper-ARF.tgz"
@@ -59,14 +64,18 @@ jobs:
exit 1
fi
echo "Found firmware: $FILE"
echo "FILE=$FILE" >> $GITHUB_OUTPUT
- name: Create Release
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version.outputs.NEW_TAG }}
name: Release ${{ steps.version.outputs.NEW_TAG }}
generate_release_notes: true
files: ${{ steps.firmware.outputs.FILE }}
make_latest: true
files: |
${{ steps.firmware.outputs.FILE }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}