2626 id : current
2727 run : |
2828 VERSION=$(jq -r '.packages[] | select(.name == "filament/filament") | .version' composer.lock)
29- echo "version=$VERSION" >> $GITHUB_OUTPUT
29+ # Strip 'v' prefix to match tag format
30+ echo "version=${VERSION#v}" >> $GITHUB_OUTPUT
3031
3132 - name : Get latest tag and its Filament version
3233 id : previous
@@ -42,13 +43,13 @@ jobs:
4243 echo "tag=$LATEST_TAG" >> $GITHUB_OUTPUT
4344
4445 TAG_VERSION=$(git show "$LATEST_TAG":composer.lock | jq -r '.packages[] | select(.name == "filament/filament") | .version')
45- echo "version=$TAG_VERSION" >> $GITHUB_OUTPUT
46+ echo "version=${ TAG_VERSION#v} " >> $GITHUB_OUTPUT
4647
4748 - name : Check if Filament was updated since last release
4849 id : check
4950 run : |
50- echo "Current: ${{ steps.current.outputs.version }}"
51- echo "Tag ( ${{ steps.previous.outputs.tag }}) : ${{ steps.previous.outputs.version }}"
51+ echo "Current Filament : ${{ steps.current.outputs.version }}"
52+ echo "Latest tag: ${{ steps.previous.outputs.tag }} (Filament : ${{ steps.previous.outputs.version }}) "
5253
5354 if [ -z "${{ steps.previous.outputs.tag }}" ]; then
5455 echo "updated=false" >> $GITHUB_OUTPUT
@@ -58,30 +59,12 @@ jobs:
5859 echo "updated=false" >> $GITHUB_OUTPUT
5960 fi
6061
61- - name : Bump patch version
62- if : steps.check.outputs.updated == 'true'
63- id : version
64- run : |
65- LATEST_TAG="${{ steps.previous.outputs.tag }}"
66-
67- # Strip 'v' prefix if present
68- VERSION="${LATEST_TAG#v}"
69-
70- # Split into major.minor.patch
71- IFS='.' read -r MAJOR MINOR PATCH <<< "$VERSION"
72-
73- # Increment patch
74- NEW_PATCH=$((PATCH + 1))
75- NEW_TAG="${MAJOR}.${MINOR}.${NEW_PATCH}"
76-
77- echo "new_tag=$NEW_TAG" >> $GITHUB_OUTPUT
78-
7962 - name : Create GitHub Release
80- if : steps.check.outputs.updated == 'true' && steps.version.outputs.new_tag != ''
63+ if : steps.check.outputs.updated == 'true'
8164 run : |
82- gh release create "${{ steps.version .outputs.new_tag }}" \
65+ gh release create "${{ steps.current .outputs.version }}" \
8366 --target main \
84- --title "${{ steps.version .outputs.new_tag }}" \
85- --notes "Bump Filament to ${{ steps.current.outputs.version }}"
67+ --title "${{ steps.current .outputs.version }}" \
68+ --notes "Bump Filament to v ${{ steps.current.outputs.version }}"
8669 env :
8770 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments