File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4141 with :
4242 name : release-apk
4343 path : build/app/outputs/flutter-apk/app-release.apk
44+
45+ # New steps for creating tag and release
46+ - name : Generate build timestamp
47+ id : timestamp
48+ run : echo "timestamp=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
49+
50+ - name : Create tag
51+ id : create_tag
52+ if : github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
53+ run : |
54+ TAG_NAME="v$(grep 'version:' pubspec.yaml | awk '{print $2}' | tr -d "'")-build-${{ steps.timestamp.outputs.timestamp }}"
55+ git tag $TAG_NAME
56+ git push origin $TAG_NAME
57+ echo "tag=$TAG_NAME" >> $GITHUB_OUTPUT
58+
59+ - name : Create Release
60+ if : github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
61+ uses : ncipollo/release-action@v1
62+ with :
63+ tag : ${{ steps.create_tag.outputs.tag }}
64+ name : Release ${{ steps.create_tag.outputs.tag }}
65+ artifacts : " build/app/outputs/flutter-apk/app-release.apk"
66+ token : ${{ secrets.GITHUB_TOKEN }}
67+ generateReleaseNotes : true
4468
You can’t perform that action at this time.
0 commit comments