File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Flash CLI CI + Conditional Release
22
3+ permissions :
4+ contents : write # REQUIRED to create GitHub releases
5+
36on :
47 push :
58 branches : ["main"]
1215 # ------------------------------
1316 ci :
1417 runs-on : ubuntu-latest
18+
1519 steps :
1620 - name : Checkout code
1721 uses : actions/checkout@v3
3943 fi
4044
4145 # -------------------------------------------------------
42- # 2. RELEASE JOB (Runs only on push to main)
46+ # 2. RELEASE JOB (Only on push to main)
4347 # -------------------------------------------------------
4448 release :
4549 needs : ci
@@ -73,15 +77,16 @@ jobs:
7377 - name : Stop if version did not change
7478 if : env.changed == 'false'
7579 run : |
76- echo "version.h not changed → skip release"
80+ echo "version.h not changed → skipping release"
7781 exit 0
7882
83+ # Extract version text
7984 - name : Extract version from version.h
8085 run : |
8186 VERSION=$(grep "RELEASE_VERSION" lib/version.h | cut -d '"' -f2)
8287 echo "VERSION=$VERSION" >> $GITHUB_ENV
8388
84- # Linux build of final binary
89+ # Build final binary
8590 - name : Build Linux binary
8691 run : gcc Flash-cli.c -o flash-linux-x64 -lcurl
8792
9095 run : |
9196 echo "TITLE=${{ github.event.head_commit.message }}" >> $GITHUB_ENV
9297
98+ # Create GitHub Release
9399 - name : Create GitHub Release
94100 uses : softprops/action-gh-release@v1
95101 with :
You can’t perform that action at this time.
0 commit comments